Sha256: 3e608a71bb34ed08a9dbb3eeb4e9cda508e00e6c0268e7c24393590b1ef676bc

Contents?: true

Size: 588 Bytes

Versions: 3

Compression:

Stored size: 588 Bytes

Contents

# frozen_string_literal: true

require "pakyow/support/extension"

module Pakyow
  module Assets
    module Behavior
      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, asset.public_path)
                end

                content
              end
            end
          end
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
pakyow-assets-1.0.0.rc3 lib/pakyow/assets/behavior/processing.rb
pakyow-assets-1.0.0.rc2 lib/pakyow/assets/behavior/processing.rb
pakyow-assets-1.0.0.rc1 lib/pakyow/assets/behavior/processing.rb