Class: ObjectForge::Molds::KeywordsMold
- Inherits:
-
Object
- Object
- ObjectForge::Molds::KeywordsMold
- Defined in:
- lib/object_forge/molds/keywords_mold.rb
Overview
Basic mold which calls forged.new(**attributes).
Can be used instead of SingleArgumentMold, but performance is about 1.5 times worse.
Instance Method Summary collapse
-
#call(forged:, attributes:, **_) ⇒ Any
Instantiate
forgedwith a hash of attributes.
Instance Method Details
#call(forged:, attributes:, **_) ⇒ Any
Instantiate forged with a hash of attributes.
18 19 20 |
# File 'lib/object_forge/molds/keywords_mold.rb', line 18 def call(forged:, attributes:, **_) forged.new(**attributes) end |