Class: Fear::Extractor::TypedIdentifierMatcher Private

Inherits:
Matcher
  • Object
show all
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

Methods inherited from Matcher

#and, #call, #call_or_else, #initialize

Constructor Details

This class inherits a constructor from Fear::Extractor::Matcher

Instance Attribute Details

#identifierIdentifierMatcher

Returns:



13
14
15
# File 'lib/fear/extractor/typed_identifier_matcher.rb', line 13

def defined_at?(other)
  type.defined_at?(other)
end

#typeValueMatcher

Returns:



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.

Returns:

  • (Boolean)


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