Class: DynamicActiveModel::Database::ModelUpdater
- Inherits:
-
Struct
- Object
- Struct
- DynamicActiveModel::Database::ModelUpdater
- Defined in:
- lib/dynamic-active-model/database.rb
Overview
Helper class for updating model definitions
Instance Attribute Summary collapse
-
#model ⇒ Object
Returns the value of attribute model.
Instance Method Summary collapse
-
#update_model(&block) ⇒ Object
Updates a model’s definition with the provided block.
Instance Attribute Details
#model ⇒ Object
Returns the value of attribute model
36 37 38 |
# File 'lib/dynamic-active-model/database.rb', line 36 def model @model end |
Instance Method Details
#update_model(&block) ⇒ Object
Updates a model’s definition with the provided block
39 40 41 |
# File 'lib/dynamic-active-model/database.rb', line 39 def update_model(&block) model.class_eval(&block) end |