Sha256: c5d014c8d3bb8e680e2c3fafcdf0f63e03598e0640a26205d507dd733209f4da

Contents?: true

Size: 647 Bytes

Versions: 3

Compression:

Stored size: 647 Bytes

Contents

require 'slim-grunt-helpers/models/usemin'

module SlimGruntHelpers

  module Models

    class UseminJs < Usemin

      protected

        def transform_link(link, options={})
          link_path  = ''
          link_path += '/' if options[:absolute]
          link_path += link[:path].to_s
          
          text  = %Q{<script src="#{ link_path }"}
          link[:options].each do |key, value|
            if value == true
              text << %Q{ #{ key }}
            elsif value
              text << %Q{ #{ key }="#{ value }"}
            end
          end
          text << '></script>'

          text
        end

    end

  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
slim-grunt-helpers-0.4.1 lib/slim-grunt-helpers/models/usemin_js.rb
slim-grunt-helpers-0.4.0 lib/slim-grunt-helpers/models/usemin_js.rb
slim-grunt-helpers-0.3.0 lib/slim-grunt-helpers/models/usemin_js.rb