Class: XRay::CSS::Selector
Instance Attribute Summary collapse
-
#simple_selectors ⇒ Object
readonly
Returns the value of attribute simple_selectors.
Instance Method Summary collapse
-
#initialize(simple_selectors) ⇒ Selector
constructor
A new instance of Selector.
- #position ⇒ Object
- #text ⇒ Object
Constructor Details
#initialize(simple_selectors) ⇒ Selector
Returns a new instance of Selector.
81 82 83 |
# File 'lib/css/struct.rb', line 81 def initialize(simple_selectors) @simple_selectors = simple_selectors end |
Instance Attribute Details
#simple_selectors ⇒ Object (readonly)
Returns the value of attribute simple_selectors.
79 80 81 |
# File 'lib/css/struct.rb', line 79 def simple_selectors @simple_selectors end |
Instance Method Details
#position ⇒ Object
89 90 91 |
# File 'lib/css/struct.rb', line 89 def position simple_selectors.empty? ? nil : simple_selectors[0].position end |
#text ⇒ Object
85 86 87 |
# File 'lib/css/struct.rb', line 85 def text @simple_selectors.collect(&:text).join(', ') end |