Module: Sprockets::SassFunctions
- Defined in:
- lib/sprockets/sass_functions.rb
Instance Method Summary collapse
- #asset_path(path) ⇒ Object
- #asset_url(path) ⇒ Object
- #audio_path(path) ⇒ Object
- #audio_url(path) ⇒ Object
- #font_path(path) ⇒ Object
- #font_url(path) ⇒ Object
- #image_path(path) ⇒ Object
- #image_url(path) ⇒ Object
- #javascript_path(path) ⇒ Object
- #javascript_url(path) ⇒ Object
- #stylesheet_path(path) ⇒ Object
- #stylesheet_url(path) ⇒ Object
- #video_path(path) ⇒ Object
- #video_url(path) ⇒ Object
Instance Method Details
#asset_path(path) ⇒ Object
5 6 7 |
# File 'lib/sprockets/sass_functions.rb', line 5 def asset_path(path) Sass::Script::String.new(sprockets_context.asset_path(path.value), :string) end |
#asset_url(path) ⇒ Object
9 10 11 |
# File 'lib/sprockets/sass_functions.rb', line 9 def asset_url(path) Sass::Script::String.new("url(" + sprockets_context.asset_path(path.value) + ")") end |
#audio_path(path) ⇒ Object
29 30 31 |
# File 'lib/sprockets/sass_functions.rb', line 29 def audio_path(path) Sass::Script::String.new(sprockets_context.audio_path(path.value), :string) end |
#audio_url(path) ⇒ Object
33 34 35 |
# File 'lib/sprockets/sass_functions.rb', line 33 def audio_url(path) Sass::Script::String.new("url(" + sprockets_context.audio_path(path.value) + ")") end |
#font_path(path) ⇒ Object
37 38 39 |
# File 'lib/sprockets/sass_functions.rb', line 37 def font_path(path) Sass::Script::String.new(sprockets_context.font_path(path.value), :string) end |
#font_url(path) ⇒ Object
41 42 43 |
# File 'lib/sprockets/sass_functions.rb', line 41 def font_url(path) Sass::Script::String.new("url(" + sprockets_context.font_path(path.value) + ")") end |
#image_path(path) ⇒ Object
13 14 15 |
# File 'lib/sprockets/sass_functions.rb', line 13 def image_path(path) Sass::Script::String.new(sprockets_context.image_path(path.value), :string) end |
#image_url(path) ⇒ Object
17 18 19 |
# File 'lib/sprockets/sass_functions.rb', line 17 def image_url(path) Sass::Script::String.new("url(" + sprockets_context.image_path(path.value) + ")") end |
#javascript_path(path) ⇒ Object
45 46 47 |
# File 'lib/sprockets/sass_functions.rb', line 45 def javascript_path(path) Sass::Script::String.new(sprockets_context.javascript_path(path.value), :string) end |
#javascript_url(path) ⇒ Object
49 50 51 |
# File 'lib/sprockets/sass_functions.rb', line 49 def javascript_url(path) Sass::Script::String.new("url(" + sprockets_context.javascript_path(path.value) + ")") end |
#stylesheet_path(path) ⇒ Object
53 54 55 |
# File 'lib/sprockets/sass_functions.rb', line 53 def stylesheet_path(path) Sass::Script::String.new(sprockets_context.stylesheet_path(path.value), :string) end |
#stylesheet_url(path) ⇒ Object
57 58 59 |
# File 'lib/sprockets/sass_functions.rb', line 57 def stylesheet_url(path) Sass::Script::String.new("url(" + sprockets_context.stylesheet_path(path.value) + ")") end |
#video_path(path) ⇒ Object
21 22 23 |
# File 'lib/sprockets/sass_functions.rb', line 21 def video_path(path) Sass::Script::String.new(sprockets_context.video_path(path.value), :string) end |
#video_url(path) ⇒ Object
25 26 27 |
# File 'lib/sprockets/sass_functions.rb', line 25 def video_url(path) Sass::Script::String.new("url(" + sprockets_context.video_path(path.value) + ")") end |