Class: Dassets::Sass::Engine
- Inherits:
-
Engine
- Object
- Engine
- Dassets::Sass::Engine
- Defined in:
- lib/dassets-sass.rb
Instance Method Summary collapse
- #compile(input_content) ⇒ Object
- #ext(input_ext) ⇒ Object
- #load_paths ⇒ Object
- #output_style ⇒ Object
- #syntax ⇒ Object
Instance Method Details
#compile(input_content) ⇒ Object
26 27 28 29 30 31 32 |
# File 'lib/dassets-sass.rb', line 26 def compile(input_content) ::Sass.compile(input_content, { :syntax => self.syntax.to_sym, :style => self.output_style.to_sym, :load_paths => self.load_paths }) end |
#ext(input_ext) ⇒ Object
22 23 24 |
# File 'lib/dassets-sass.rb', line 22 def ext(input_ext) 'css' end |
#load_paths ⇒ Object
17 18 19 20 |
# File 'lib/dassets-sass.rb', line 17 def load_paths @load_paths ||= ([self.opts['source_path']] + [*(self.opts[:load_paths] || self.opts['load_paths'] || [])]) end |
#output_style ⇒ Object
13 14 15 |
# File 'lib/dassets-sass.rb', line 13 def output_style (self.opts[:output_style] || self.opts['output_style'] || 'nested').to_s end |
#syntax ⇒ Object
9 10 11 |
# File 'lib/dassets-sass.rb', line 9 def syntax (self.opts[:syntax] || self.opts['syntax'] || 'scss').to_s end |