class Frozen::Template::Stylesheet
Attributes
file_load_path[RW]
options[RW]
Public Class Methods
new(options={})
click to toggle source
# File lib/frozen/template/stylesheet.rb, line 10 def initialize(options={}) @options = { :style => :compressed, :format => nil, :load_path => nil }.merge(options) end
Public Instance Methods
build_extension()
click to toggle source
# File lib/frozen/template/stylesheet.rb, line 27 def build_extension ".css" end
build_path()
click to toggle source
# File lib/frozen/template/stylesheet.rb, line 31 def build_path "css" end
contents()
click to toggle source
# File lib/frozen/template/stylesheet.rb, line 23 def contents read_from_file(file_path) end
load_paths()
click to toggle source
# File lib/frozen/template/stylesheet.rb, line 35 def load_paths [options[:load_path], file_load_path] end
read_from_file(file)
click to toggle source
Calls superclass method
Frozen::Template::Base#read_from_file
# File lib/frozen/template/stylesheet.rb, line 18 def read_from_file(file) self.file_load_path = File.dirname(file) super(file) end
render()
click to toggle source
# File lib/frozen/template/stylesheet.rb, line 39 def render engine = Sass::Engine.new(contents, :syntax => file_type.to_sym, :style => options[:style], :load_paths => load_paths) engine.render end