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
11 12 13 |
# File 'lib/fear/extractor/typed_identifier_matcher.rb', line 11 def defined_at?(other) type.defined_at?(other) end |
#type ⇒ ValueMatcher
11 12 13 |
# File 'lib/fear/extractor/typed_identifier_matcher.rb', line 11 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.
15 16 17 |
# File 'lib/fear/extractor/typed_identifier_matcher.rb', line 15 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.
11 12 13 |
# File 'lib/fear/extractor/typed_identifier_matcher.rb', line 11 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.
19 20 21 |
# File 'lib/fear/extractor/typed_identifier_matcher.rb', line 19 def failure_reason(other) type.failure_reason(other) end |