Class: Moon::Action::Models::Initializer::Builder
- Inherits:
-
Object
- Object
- Moon::Action::Models::Initializer::Builder
- Defined in:
- lib/moon/action/models/initializer.rb
Overview
Build a model out of the key and the hash
Instance Method Summary collapse
-
#initialize(key, attributes) ⇒ Builder
constructor
A new instance of Builder.
- #model ⇒ Object
Constructor Details
#initialize(key, attributes) ⇒ Builder
Returns a new instance of Builder.
23 24 25 |
# File 'lib/moon/action/models/initializer.rb', line 23 def initialize(key, attributes) @key, @attributes = key, attributes end |
Instance Method Details
#model ⇒ Object
27 28 29 30 31 32 |
# File 'lib/moon/action/models/initializer.rb', line 27 def model fetch_model_class initialize_model set_model_attributes @model end |