Class: Mutant::Matcher::Config
- Inherits:
-
Object
- Object
- Mutant::Matcher::Config
- Includes:
- Adamantium, Anima::Update
- Defined in:
- lib/mutant/matcher/config.rb
Overview
Subject matcher configuration
Constant Summary collapse
- INSPECT_FORMAT =
"#<#{self} %s>".freeze
- ATTRIBUTE_DELIMITER =
' '.freeze
- ATTRIBUTE_FORMAT =
'%s: [%s]'.freeze
- ENUM_DELIMITER =
','.freeze
- EMPTY_ATTRIBUTES =
'empty'.freeze
- PRESENTATIONS =
IceNine.deep_freeze( match_expressions: :syntax, ignore_expressions: :syntax, subject_filters: :inspect )
- DEFAULT =
new(Hash[anima.attribute_names.map { |name| [name, []] }])
Instance Method Summary collapse
-
#add(attribute, value) ⇒ Config
private
Add value to configurable collection.
-
#inspect ⇒ String
private
Inspection string.
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.
Add value to configurable collection
43 44 45 |
# File 'lib/mutant/matcher/config.rb', line 43 def add(attribute, value) update(attribute => public_send(attribute).dup << value) end |
#inspect ⇒ String
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.
Inspection string
30 31 32 |
# File 'lib/mutant/matcher/config.rb', line 30 def inspect INSPECT_FORMAT % inspect_attributes end |