Module: Precious::Views::SprocketsHelpers
Class Method Summary collapse
Instance Method Summary collapse
- #sprockets_asset_path ⇒ Object
- #sprockets_image_path ⇒ Object
- #sprockets_javascript_tag ⇒ Object
- #sprockets_stylesheet_tag ⇒ Object
Class Method Details
.included(base) ⇒ Object
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 |
# File 'lib/gollum/views/helpers.rb', line 99 def self.included(base) def sprockets_stylesheet_tag lambda do |args| args = args.split(' ') name = args[0] = {:media => :all} [:media] = :print if args[1] == 'print' send(:stylesheet_tag, name, ) end end def sprockets_asset_path lambda do |name| send(:asset_path, name) end end def sprockets_javascript_tag lambda do |name| send(:javascript_tag, name) end end def sprockets_image_path lambda do |args| send(:image_path, name) end end end |
Instance Method Details
#sprockets_asset_path ⇒ Object
111 112 113 114 115 |
# File 'lib/gollum/views/helpers.rb', line 111 def sprockets_asset_path lambda do |name| send(:asset_path, name) end end |
#sprockets_image_path ⇒ Object
123 124 125 126 127 |
# File 'lib/gollum/views/helpers.rb', line 123 def sprockets_image_path lambda do |args| send(:image_path, name) end end |
#sprockets_javascript_tag ⇒ Object
117 118 119 120 121 |
# File 'lib/gollum/views/helpers.rb', line 117 def sprockets_javascript_tag lambda do |name| send(:javascript_tag, name) end end |
#sprockets_stylesheet_tag ⇒ Object
101 102 103 104 105 106 107 108 109 |
# File 'lib/gollum/views/helpers.rb', line 101 def sprockets_stylesheet_tag lambda do |args| args = args.split(' ') name = args[0] = {:media => :all} [:media] = :print if args[1] == 'print' send(:stylesheet_tag, name, ) end end |