Module: Disposable::Twin::Struct

Defined in:
lib/disposable/twin/struct.rb

Overview

Twin that uses a hash to populate.

Twin.new(id: 1)

Instance Method Summary collapse

Instance Method Details

#initialize(model, options = {}) ⇒ Object



7
8
9
10
11
# File 'lib/disposable/twin/struct.rb', line 7

def initialize(model, options={})
  super # call from_hash(options) # FIXME: this is wrong and already calls from_hash(options)

  from_hash(model.merge(options))
end