Class: YTools::Path::Selector

Inherits:
Object
  • Object
show all
Defined in:
lib/ytools/path/selectors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#subselectorObject (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

Returns:

  • (Boolean)


19
20
21
# File 'lib/ytools/path/selectors.rb', line 19

def chained?
  !@subselector.nil?
end