module Less::Rails::Helpers::ClassMethods
Public Instance Methods
asset_data_url(path)
click to toggle source
# File lib/less/rails/helpers.rb, line 41 def asset_data_url(path) "url(#{scope.asset_data_uri(path)})" end
asset_path(asset)
click to toggle source
# File lib/less/rails/helpers.rb, line 45 def asset_path(asset) public_path(asset).inspect end
asset_url(asset)
click to toggle source
# File lib/less/rails/helpers.rb, line 49 def asset_url(asset) "url(#{public_path(asset)})" end
audio_path(audio)
click to toggle source
# File lib/less/rails/helpers.rb, line 69 def audio_path(audio) scope.audio_path(audio).inspect end
audio_url(audio)
click to toggle source
# File lib/less/rails/helpers.rb, line 73 def audio_url(audio) "url(#{scope.audio_path(audio)})" end
font_path(font)
click to toggle source
# 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)
click to toggle source
# 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)
click to toggle source
# File lib/less/rails/helpers.rb, line 53 def image_path(img) scope.image_path(img).inspect end
image_url(img)
click to toggle source
# File lib/less/rails/helpers.rb, line 57 def image_url(img) "url(#{scope.image_path(img)})" end
javascript_path(javascript)
click to toggle source
# File lib/less/rails/helpers.rb, line 77 def javascript_path(javascript) scope.javascript_path(javascript).inspect end
javascript_url(javascript)
click to toggle source
# File lib/less/rails/helpers.rb, line 81 def javascript_url(javascript) "url(#{scope.javascript_path(javascript)})" end
stylesheet_path(stylesheet)
click to toggle source
# File lib/less/rails/helpers.rb, line 85 def stylesheet_path(stylesheet) scope.stylesheet_path(stylesheet).inspect end
stylesheet_url(stylesheet)
click to toggle source
# File lib/less/rails/helpers.rb, line 89 def stylesheet_url(stylesheet) "url(#{scope.stylesheet_path(stylesheet)})" end
video_path(video)
click to toggle source
# File lib/less/rails/helpers.rb, line 61 def video_path(video) scope.video_path(video).inspect end
video_url(video)
click to toggle source
# File lib/less/rails/helpers.rb, line 65 def video_url(video) "url(#{scope.video_path(video)})" end
Private Instance Methods
context_asset_data_uri(path)
click to toggle source
# File lib/less/rails/helpers.rb, line 123 def context_asset_data_uri(path) end
public_path(asset)
click to toggle source
# File lib/less/rails/helpers.rb, line 115 def public_path(asset) if scope.respond_to?(:asset_paths) scope.asset_paths.compute_public_path asset, ::Rails.application.config.assets.prefix else scope.path_to_asset(asset) end end
scope()
click to toggle source
# File lib/less/rails/helpers.rb, line 111 def scope Less.Parser['scope'] end
unquote(str)
click to toggle source
# File lib/less/rails/helpers.rb, line 127 def unquote(str) s = str.to_s.strip s =~ /^['"](.*?)['"]$/ ? $1 : s end