Class: Mutant::Matcher::Config

Inherits:
Object
  • Object
show all
Includes:
Adamantium, Anima::Update
Defined in:
lib/mutant/matcher/config.rb

Overview

Match configuration

Constant Summary collapse

DEFAULT =
new(Hash[anima.attribute_names.map { |name| [name, []] }])

Instance Method Summary collapse

Instance Method Details

#add(attribute, value) ⇒ Config

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.

Return configuration with added value

Parameters:

  • attribute (Symbol)
  • value (Object)

Returns:



22
23
24
# File 'lib/mutant/matcher/config.rb', line 22

def add(attribute, value)
  update(attribute => public_send(attribute).dup << value)
end