Class: CssCompare::Engine
- Inherits:
-
Object
- Object
- CssCompare::Engine
- Defined in:
- lib/css_compare/engine.rb
Overview
The engine responsible for the CSS comparison
Instance Method Summary collapse
-
#equal? ⇒ Boolean
Checks, whether the parsed CSS files are equal.
-
#initialize(options) ⇒ Engine
constructor
A new instance of Engine.
-
#parse! ⇒ Engine
Parses and evaluates the input CSS stylesheets - the operands.
Constructor Details
#initialize(options) ⇒ Engine
Returns a new instance of Engine.
6 7 8 9 |
# File 'lib/css_compare/engine.rb', line 6 def initialize() @options = @operands = [] end |
Instance Method Details
#equal? ⇒ Boolean
Checks, whether the parsed CSS files are equal.
The CSS files are equal, if they define the same components, that are also equal and at the same time, no component is missing from either of the files.
27 28 29 |
# File 'lib/css_compare/engine.rb', line 27 def equal? @operands.first == @operands.last end |