Module: Disposable::Twin::Parent

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(includer) ⇒ Object



2
3
4
5
6
# File 'lib/disposable/twin/parent.rb', line 2

def self.included(includer)
  includer.class_eval do
    property(:parent, virtual: true)
  end
end

Instance Method Details

#build_twin(dfn, value, options = {}) ⇒ Object

FIXME: for collections, this will merge options for every element.



9
10
11
# File 'lib/disposable/twin/parent.rb', line 9

def build_twin(dfn, value, options={})
  super(dfn, value, options.merge(parent: self))
end