Module: Less::Rails::Helpers::ClassMethods
- Defined in:
- lib/less/rails/helpers.rb
Instance Method Summary collapse
- #asset_data_url(path) ⇒ Object
- #asset_path(asset) ⇒ Object
- #asset_url(asset) ⇒ Object
- #audio_path(audio) ⇒ Object
- #audio_url(audio) ⇒ Object
- #font_path(font) ⇒ Object
- #font_url(font) ⇒ Object
- #image_path(img) ⇒ Object
- #image_url(img) ⇒ Object
- #javascript_path(javascript) ⇒ Object
- #javascript_url(javascript) ⇒ Object
- #stylesheet_path(stylesheet) ⇒ Object
- #stylesheet_url(stylesheet) ⇒ Object
- #video_path(video) ⇒ Object
- #video_url(video) ⇒ Object
Instance Method Details
#asset_data_url(path) ⇒ Object
41 42 43 |
# File 'lib/less/rails/helpers.rb', line 41 def asset_data_url(path) "url(#{scope.asset_data_uri(path)})" end |
#asset_path(asset) ⇒ Object
45 46 47 |
# File 'lib/less/rails/helpers.rb', line 45 def asset_path(asset) public_path(asset).inspect end |
#asset_url(asset) ⇒ Object
49 50 51 |
# File 'lib/less/rails/helpers.rb', line 49 def asset_url(asset) "url(#{public_path(asset)})" end |
#audio_path(audio) ⇒ Object
69 70 71 |
# File 'lib/less/rails/helpers.rb', line 69 def audio_path(audio) scope.audio_path(audio).inspect end |
#audio_url(audio) ⇒ Object
73 74 75 |
# File 'lib/less/rails/helpers.rb', line 73 def audio_url(audio) "url(#{scope.audio_path(audio)})" end |
#font_path(font) ⇒ Object
93 94 95 96 97 98 99 |
# File 'lib/less/rails/helpers.rb', line 93 def font_path(font) if scope.respond_to?(:font_path) scope.font_path(font).inspect else asset_path(font) end end |
#font_url(font) ⇒ Object
101 102 103 104 105 106 107 |
# File 'lib/less/rails/helpers.rb', line 101 def font_url(font) if scope.respond_to?(:font_path) "url(#{scope.font_path(font)})" else asset_url(font) end end |
#image_path(img) ⇒ Object
53 54 55 |
# File 'lib/less/rails/helpers.rb', line 53 def image_path(img) scope.image_path(img).inspect end |
#image_url(img) ⇒ Object
57 58 59 |
# File 'lib/less/rails/helpers.rb', line 57 def image_url(img) "url(#{scope.image_path(img)})" end |
#javascript_path(javascript) ⇒ Object
77 78 79 |
# File 'lib/less/rails/helpers.rb', line 77 def javascript_path(javascript) scope.javascript_path(javascript).inspect end |
#javascript_url(javascript) ⇒ Object
81 82 83 |
# File 'lib/less/rails/helpers.rb', line 81 def javascript_url(javascript) "url(#{scope.javascript_path(javascript)})" end |
#stylesheet_path(stylesheet) ⇒ Object
85 86 87 |
# File 'lib/less/rails/helpers.rb', line 85 def stylesheet_path(stylesheet) scope.stylesheet_path(stylesheet).inspect end |
#stylesheet_url(stylesheet) ⇒ Object
89 90 91 |
# File 'lib/less/rails/helpers.rb', line 89 def stylesheet_url(stylesheet) "url(#{scope.stylesheet_path(stylesheet)})" end |
#video_path(video) ⇒ Object
61 62 63 |
# File 'lib/less/rails/helpers.rb', line 61 def video_path(video) scope.video_path(video).inspect end |
#video_url(video) ⇒ Object
65 66 67 |
# File 'lib/less/rails/helpers.rb', line 65 def video_url(video) "url(#{scope.video_path(video)})" end |