Module: Disposable::Twin::Setup
- Included in:
- Disposable::Twin
- Defined in:
- lib/disposable/twin/setup.rb
Overview
Read all properties at twin initialization time from model. Simply pass through all properties from the model to the respective twin writer method. This will result in all twin properties/collection items being twinned, and collections being Collection to expose the desired public API.
Defined Under Namespace
Modules: SkipSetter
Instance Method Summary collapse
-
#initialize(model, options = {}) ⇒ Object
test is in incoming hash? is nil on incoming model?.
Instance Method Details
#initialize(model, options = {}) ⇒ Object
test is in incoming hash? is nil on incoming model?
10 11 12 13 14 15 16 |
# File 'lib/disposable/twin/setup.rb', line 10 def initialize(model, ={}) @fields = {} @model = model @mapper = mapper_for(model) # mapper for model. setup_properties!(model, ) end |