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:



11
12
13
# File 'lib/fear/extractor/typed_identifier_matcher.rb', line 11

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

#typeValueMatcher

Returns:



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.

Returns:

  • (Boolean)


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