Class: StyleCop::SelectorDifference
- Inherits:
-
Object
- Object
- StyleCop::SelectorDifference
- Defined in:
- lib/style_cop/selector_difference.rb
Constant Summary collapse
- MISSING_CSS_TEXT =
"element is missing the following css"
- EXTRA_CSS_TEXT =
"element has the following extra css"
- MISSING_STRUCTURE_TEXT =
"element is missing the following structure piece"
- EXTRA_STRUCTURE_TEXT =
"element has the following extra structure piece"
Instance Method Summary collapse
- #empty? ⇒ Boolean
- #error_message ⇒ Object
-
#initialize(selector, other_selector) ⇒ SelectorDifference
constructor
A new instance of SelectorDifference.
Constructor Details
#initialize(selector, other_selector) ⇒ SelectorDifference
Returns a new instance of SelectorDifference.
8 9 10 11 |
# File 'lib/style_cop/selector_difference.rb', line 8 def initialize(selector, other_selector) @selector = selector @other_selector = other_selector end |
Instance Method Details
#empty? ⇒ Boolean
13 14 15 |
# File 'lib/style_cop/selector_difference.rb', line 13 def empty? selector.representation == other_selector.representation end |
#error_message ⇒ Object
17 18 19 |
# File 'lib/style_cop/selector_difference.rb', line 17 def (css_errors + structure_errors).join(", ") end |