Class: YTools::Path::Selector
- Inherits:
-
Object
- Object
- YTools::Path::Selector
- Defined in:
- lib/ytools/path/selectors.rb
Direct Known Subclasses
ChildSelector, DescendantSelector, IndexSelector, RootSelector
Instance Attribute Summary collapse
-
#subselector ⇒ Object
readonly
Returns the value of attribute subselector.
Instance Method Summary collapse
-
#chain(selector) ⇒ Object
alias :chain :<<.
- #chained? ⇒ Boolean
Instance Attribute Details
#subselector ⇒ Object (readonly)
Returns the value of attribute subselector.
7 8 9 |
# File 'lib/ytools/path/selectors.rb', line 7 def subselector @subselector end |
Instance Method Details
#chain(selector) ⇒ Object
alias :chain :<<
10 11 12 13 14 15 16 17 |
# File 'lib/ytools/path/selectors.rb', line 10 def chain(selector) if !chained? @subselector = selector else @subselector.chain(selector) end self end |
#chained? ⇒ Boolean
19 20 21 |
# File 'lib/ytools/path/selectors.rb', line 19 def chained? !@subselector.nil? end |