Class: Rosette::Core::PathMatcherFactory::AndNode
- Inherits:
-
BinaryNode
- Object
- Node
- BinaryNode
- Rosette::Core::PathMatcherFactory::AndNode
- Defined in:
- lib/rosette/core/path_matcher_factory.rb
Overview
A logical “and”.
Instance Attribute Summary
Attributes inherited from BinaryNode
Instance Method Summary collapse
-
#matches?(path) ⇒ Boolean
Determines if the given path matches the left AND 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 AND the right child’s conditions.
182 183 184 |
# File 'lib/rosette/core/path_matcher_factory.rb', line 182 def matches?(path) left.matches?(path) && right.matches?(path) end |
#to_s ⇒ String
Generates a string representation of this node.
189 190 191 |
# File 'lib/rosette/core/path_matcher_factory.rb', line 189 def to_s "(#{left.to_s} AND #{right.to_s})" end |