class SlimGruntHelpers::Models::UseminJs
Protected Instance Methods
transform_link(link, options={})
click to toggle source
# File lib/slim-grunt-helpers/models/usemin_js.rb, line 11 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