Class: Rbss::Selector
- Inherits:
-
Struct
- Object
- Struct
- Rbss::Selector
- Defined in:
- lib/rbss/selector.rb
Instance Attribute Summary collapse
-
#classes_ids ⇒ Object
Returns the value of attribute classes_ids.
-
#div ⇒ Object
Returns the value of attribute div.
Instance Method Summary collapse
- #add_to_properties(property) ⇒ Object
- #identify_parent(name) ⇒ Object
- #name ⇒ Object
- #parent ⇒ Object
- #properties ⇒ Object
Instance Attribute Details
#classes_ids ⇒ Object
Returns the value of attribute classes_ids
2 3 4 |
# File 'lib/rbss/selector.rb', line 2 def classes_ids @classes_ids end |
#div ⇒ Object
Returns the value of attribute div
2 3 4 |
# File 'lib/rbss/selector.rb', line 2 def div @div end |
Instance Method Details
#add_to_properties(property) ⇒ Object
15 16 17 18 |
# File 'lib/rbss/selector.rb', line 15 def add_to_properties(property) properties @properties << property end |
#identify_parent(name) ⇒ Object
7 8 9 |
# File 'lib/rbss/selector.rb', line 7 def identify_parent(name) @parent = name end |
#name ⇒ Object
3 4 5 |
# File 'lib/rbss/selector.rb', line 3 def name "#{"#{parent} " unless parent.nil?}#{div unless div == '_'}#{classes_ids.join}" end |
#parent ⇒ Object
11 12 13 |
# File 'lib/rbss/selector.rb', line 11 def parent @parent end |
#properties ⇒ Object
20 21 22 |
# File 'lib/rbss/selector.rb', line 20 def properties @properties ||= [] end |