Class: Hx::Path::Disjunction

Inherits:
Object
  • Object
show all
Includes:
Connective
Defined in:
lib/hx/path.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Connective

#initialize

Methods included from Selector

#&, #assume_circumfix, #elide_circumfix, #|, #~

Class Method Details

.build(*selectors) ⇒ Object



122
123
124
125
# File 'lib/hx/path.rb', line 122

def self.build(*selectors)
  return ALL if selectors.any? { |s| All === s }
  new(*selectors)
end

Instance Method Details

#accept_path?(path) ⇒ Boolean

Returns:

  • (Boolean)


127
128
129
# File 'lib/hx/path.rb', line 127

def accept_path?(path)
  @selectors.any? { |s| s.accept_path? path }
end