Sha256: b5e039e2e7f582ae7a9d24a69a79c52b36beb494ea6745a0394e2afb4da7d538
Contents?: true
Size: 760 Bytes
Versions: 3
Compression:
Stored size: 760 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, options={}) link_path = '' link_path += '/' if options[:absolute] link_path += link[:path].to_s 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
3 entries across 3 versions & 1 rubygems