Sha256: 0f8f25666ce994c347e0b3aa10f589e2ea4e693a100781486db95c39ce1568de

Contents?: true

Size: 634 Bytes

Versions: 5

Compression:

Stored size: 634 Bytes

Contents

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

module SlimGruntHelpers

  module Models

    class UseminCss < Usemin

      BASE_OPTIONS = { rel: 'stylesheet' }.freeze

      def base_options
        BASE_OPTIONS
      end

      protected

        def transform_link(link)
          text  = %Q{<link href="#{ link[:path] }"}
          link[:options].each do |key, value|
            if value == true
              text << %Q{ #{ key }}
            elsif !value.nil? && value != false
              text << %Q{ #{ key }="#{ value }"}
            end
          end
          text << ' />'

          text
        end

    end

  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
slim-grunt-helpers-0.2.1 lib/slim-grunt-helpers/models/usemin_css.rb
slim-grunt-helpers-0.2.0 lib/slim-grunt-helpers/models/usemin_css.rb
slim-grunt-helpers-0.1.0 lib/slim-grunt-helpers/models/usemin_css.rb
slim-grunt-helpers-0.0.5 lib/slim-grunt-helpers/models/usemin_css.rb
slim-grunt-helpers-0.0.4 lib/slim-grunt-helpers/models/usemin_css.rb