Class: Fear::Extractor::TypedIdentifierMatcher Private
- Defined in:
- lib/fear/extractor/typed_identifier_matcher.rb
Overview
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.
Match and capture identifier with specific type. E.g. foo : Integer
Constant Summary
Constants inherited from Matcher
Matcher::EMPTY_ARRAY, Matcher::EMPTY_HASH
Instance Attribute Summary collapse
Instance Method Summary collapse
- #bindings(other) ⇒ Object private
- #defined_at?(other) ⇒ Boolean private
- #failure_reason(other) ⇒ Object private
Methods inherited from Matcher
#and, #call, #call_or_else, #initialize
Constructor Details
This class inherits a constructor from Fear::Extractor::Matcher
Instance Attribute Details
#identifier ⇒ IdentifierMatcher
13 14 15 |
# File 'lib/fear/extractor/typed_identifier_matcher.rb', line 13 def defined_at?(other) type.defined_at?(other) end |
#type ⇒ ValueMatcher
13 14 15 |
# File 'lib/fear/extractor/typed_identifier_matcher.rb', line 13 def defined_at?(other) type.defined_at?(other) end |
Instance Method Details
#bindings(other) ⇒ 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.
17 18 19 |
# File 'lib/fear/extractor/typed_identifier_matcher.rb', line 17 def bindings(other) { identifier.name => other } end |
#defined_at?(other) ⇒ Boolean
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.
13 14 15 |
# File 'lib/fear/extractor/typed_identifier_matcher.rb', line 13 def defined_at?(other) type.defined_at?(other) end |
#failure_reason(other) ⇒ 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.
21 22 23 |
# File 'lib/fear/extractor/typed_identifier_matcher.rb', line 21 def failure_reason(other) type.failure_reason(other) end |