class Sass::Rails::Resolver

Attributes

context[RW]

Public Instance Methods

audio_path(audio) click to toggle source
# File lib/sass/rails/template_handlers.rb, line 42
def audio_path(audio)
  context.audio_path(audio)
end
font_path(font) click to toggle source
# File lib/sass/rails/template_handlers.rb, line 54
def font_path(font)
  context.font_path(font)
end
image_path(img) click to toggle source
# File lib/sass/rails/template_handlers.rb, line 34
def image_path(img)
  context.image_path(img)
end
javascript_path(javascript) click to toggle source
# File lib/sass/rails/template_handlers.rb, line 46
def javascript_path(javascript)
  context.javascript_path(javascript)
end
process(path) click to toggle source
# File lib/sass/rails/template_handlers.rb, line 30
def process(path)
  context.environment[path].to_s
end
public_path(path, scope = nil, options = {}) click to toggle source
# File lib/sass/rails/template_handlers.rb, line 26
def public_path(path, scope = nil, options = {})
  context.asset_paths.compute_public_path(path, ::Rails.application.config.assets.prefix, options)
end
resolve(path, content_type = :self) click to toggle source
# File lib/sass/rails/template_handlers.rb, line 14
def resolve(path, content_type = :self)
  options = {}
  options[:content_type] = content_type unless content_type.nil?
  context.resolve(path, options)
rescue Sprockets::FileNotFound, Sprockets::ContentTypeMismatch
  nil
end
source_path(path, ext) click to toggle source
# File lib/sass/rails/template_handlers.rb, line 22
def source_path(path, ext)
  context.asset_paths.compute_source_path(path, ::Rails.application.config.assets.prefix, ext)
end
stylesheet_path(stylesheet) click to toggle source
# File lib/sass/rails/template_handlers.rb, line 50
def stylesheet_path(stylesheet)
  context.stylesheet_path(stylesheet)
end
video_path(video) click to toggle source
# File lib/sass/rails/template_handlers.rb, line 38
def video_path(video)
  context.video_path(video)
end

Public Class Methods

new(context) click to toggle source
# File lib/sass/rails/template_handlers.rb, line 10
def initialize(context)
  @context = context
end