Class: Fear::Extractor::ArrayHeadMatcher Private
- Defined in:
- lib/fear/extractor/array_head_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.
Part of recursive array matcher. Match against its head.
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
#index ⇒ Types::Strict::Integer
|
# File 'lib/fear/extractor/array_head_matcher.rb', line 6
|
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.
21 22 23 24 25 26 27 |
# File 'lib/fear/extractor/array_head_matcher.rb', line 21 def bindings(other) if other.empty? super else matcher.bindings(other.first) end 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.
12 13 14 15 16 17 18 |
# File 'lib/fear/extractor/array_head_matcher.rb', line 12 def defined_at?(other) if other.empty? false else matcher.defined_at?(other.first) end 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.
29 30 31 |
# File 'lib/fear/extractor/array_head_matcher.rb', line 29 def failure_reason(other) matcher.failure_reason(other.first) end |