Sha256: 0c18674bb18820cf3765fecc780695e6a8577be59077261321dbc482d09026df

Contents?: true

Size: 683 Bytes

Versions: 7

Compression:

Stored size: 683 Bytes

Contents

# frozen_string_literal: true

require "pakyow/support/extension"

module Pakyow
  class Application
    module Behavior
      module Assets
        module Processing
          extend Support::Extension

          apply_extension do
            on "load" do
              if self.class.includes_framework?(:presenter)
                self.class.processor :html do |content|
                  state(:asset).each do |asset|
                    content.gsub!(asset.logical_path, File.join(config.assets.host, asset.public_path))
                  end

                  content
                end
              end
            end
          end
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
pakyow-assets-1.0.6 lib/pakyow/application/behavior/assets/processing.rb
pakyow-assets-1.0.5 lib/pakyow/application/behavior/assets/processing.rb
pakyow-assets-1.0.4 lib/pakyow/application/behavior/assets/processing.rb
pakyow-assets-1.0.3 lib/pakyow/application/behavior/assets/processing.rb
pakyow-assets-1.0.2 lib/pakyow/application/behavior/assets/processing.rb
pakyow-assets-1.0.1 lib/pakyow/application/behavior/assets/processing.rb
pakyow-assets-1.0.0 lib/pakyow/application/behavior/assets/processing.rb