Class: Fear::Extractor::NamedArraySplatMatcher Private

Inherits:
ArraySplatMatcher show all
Defined in:
lib/fear/extractor/named_array_splat_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 against array splat, and capture rest of an array E.g. [1, 2, *tail]

Constant Summary

Constants inherited from Matcher

Matcher::EMPTY_ARRAY, Matcher::EMPTY_HASH

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from ArraySplatMatcher

#defined_at?

Methods inherited from Matcher

#and, #call, #call_or_else, #failure_reason, #initialize

Constructor Details

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

Instance Attribute Details

#nameTypes::Strict::Symbol

Returns:

  • (Types::Strict::Symbol)


10
11
12
# File 'lib/fear/extractor/named_array_splat_matcher.rb', line 10

def bindings(other)
  { name => 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.



10
11
12
# File 'lib/fear/extractor/named_array_splat_matcher.rb', line 10

def bindings(other)
  { name => other }
end