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
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 129 |
# File 'lib/gollum/views/helpers.rb', line 100 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
112 113 114 115 116 |
# File 'lib/gollum/views/helpers.rb', line 112 def sprockets_asset_path lambda do |name| send(:asset_path, name) end end |
#sprockets_image_path ⇒ Object
124 125 126 127 128 |
# File 'lib/gollum/views/helpers.rb', line 124 def sprockets_image_path lambda do |args| send(:image_path, name) end end |
#sprockets_javascript_tag ⇒ Object
118 119 120 121 122 |
# File 'lib/gollum/views/helpers.rb', line 118 def sprockets_javascript_tag lambda do |name| send(:javascript_tag, name) end end |
#sprockets_stylesheet_tag ⇒ Object
102 103 104 105 106 107 108 109 110 |
# File 'lib/gollum/views/helpers.rb', line 102 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 |