Class: ObjectForge::Forge::Parameters
- Inherits:
-
Struct
- Object
- Struct
- ObjectForge::Forge::Parameters
- Defined in:
- lib/object_forge/forge.rb
Overview
Interface for forge parameters. It is not used internally, but can be useful for defining forges through means other than ObjectForge::ForgeDSL.
Instance Attribute Summary collapse
-
#attributes ⇒ Hash{Symbol => Any}
readonly
Non-trait values of the attributes.
-
#mold ⇒ #call?
readonly
An object that knows how to build the instance.
-
#traits ⇒ Hash{Symbol => Hash{Symbol => Any}}
readonly
Attributes belonging to traits.
Instance Attribute Details
#attributes ⇒ Hash{Symbol => Any} (readonly)
Non-trait values of the attributes.
29 |
# File 'lib/object_forge/forge.rb', line 29 Parameters = Struct.new(:attributes, :traits, :mold, keyword_init: true) |
#mold ⇒ #call? (readonly)
An object that knows how to build the instance. Must have a call method that takes a class and a hash of attributes.
29 |
# File 'lib/object_forge/forge.rb', line 29 Parameters = Struct.new(:attributes, :traits, :mold, keyword_init: true) |
#traits ⇒ Hash{Symbol => Hash{Symbol => Any}} (readonly)
Attributes belonging to traits.
29 |
# File 'lib/object_forge/forge.rb', line 29 Parameters = Struct.new(:attributes, :traits, :mold, keyword_init: true) |