Class: BeautifulCss::Engine
- Inherits:
-
Object
- Object
- BeautifulCss::Engine
- Defined in:
- lib/beautiful-css/engine.rb
Instance Method Summary collapse
-
#initialize(input) ⇒ Engine
constructor
A new instance of Engine.
- #render ⇒ Object
- #scss_to_css(scss) ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(input) ⇒ Engine
Returns a new instance of Engine.
7 8 9 |
# File 'lib/beautiful-css/engine.rb', line 7 def initialize input @input = input end |
Instance Method Details
#render ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'lib/beautiful-css/engine.rb', line 19 def render return nil if @input.nil? save_imports rules = build_rules cleaned = remove_unset rules groups = build_groups(cleaned) return format( groups ) end |
#scss_to_css(scss) ⇒ Object
11 12 13 |
# File 'lib/beautiful-css/engine.rb', line 11 def scss_to_css scss Sass::Engine.new(scss,{:syntax => :scss}).render end |
#to_s ⇒ Object
15 16 17 |
# File 'lib/beautiful-css/engine.rb', line 15 def to_s render end |