Class: Rosette::Core::PathMatcherFactory::OrNode
- Inherits:
-
BinaryNode
- Object
- Node
- BinaryNode
- Rosette::Core::PathMatcherFactory::OrNode
- Defined in:
- lib/rosette/core/path_matcher_factory.rb
Overview
A logical “OR”.
Instance Attribute Summary
Attributes inherited from BinaryNode
Instance Method Summary collapse
-
#matches?(path) ⇒ Boolean
Determines if the given path matches the left OR the right child’s conditions.
-
#to_s ⇒ String
Generates a string representation of this node.
Methods inherited from BinaryNode
Methods included from NodeOperatorFactory
Methods included from NodeFactory
#match_file_extension, #match_file_extensions, #match_path, #match_paths, #match_regex, #match_regexes
Constructor Details
This class inherits a constructor from Rosette::Core::PathMatcherFactory::BinaryNode
Instance Method Details
#matches?(path) ⇒ Boolean
Determines if the given path matches the left OR the right child’s conditions.
202 203 204 |
# File 'lib/rosette/core/path_matcher_factory.rb', line 202 def matches?(path) left.matches?(path) || right.matches?(path) end |
#to_s ⇒ String
Generates a string representation of this node.
209 210 211 |
# File 'lib/rosette/core/path_matcher_factory.rb', line 209 def to_s "(#{left.to_s} OR #{right.to_s})" end |