Class: RuboCop::AST::NodePattern::Matcher Private
- Inherits:
-
Object
- Object
- RuboCop::AST::NodePattern::Matcher
- Defined in:
- lib/rubocop/ast/node_pattern.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
- #===(compare) ⇒ Object private
-
#initialize(&block) ⇒ Matcher
constructor
private
A new instance of Matcher.
Constructor Details
#initialize(&block) ⇒ Matcher
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Matcher.
941 942 943 |
# File 'lib/rubocop/ast/node_pattern.rb', line 941 def initialize(&block) @block = block end |
Instance Method Details
#===(compare) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
945 946 947 |
# File 'lib/rubocop/ast/node_pattern.rb', line 945 def ===(compare) @block.call(compare) end |