Sha256: 5fe9dcd946f22613a0063661904934441dae72ce31535632290c9bad9074d653
Contents?: true
Size: 465 Bytes
Versions: 19
Compression:
Stored size: 465 Bytes
Contents
require 'disposable/twin' module Cell module Twin def self.included(base) base.send :include, Disposable::Twin::Builder base.extend ClassMethods end module ClassMethods def twin(twin_class) super(twin_class) { |dfn| property dfn.name } # create readers to twin model. end end def initialize(model, options={}) super(build_twin(model, options), controller: options.delete(:controller)) end end end
Version data entries
19 entries across 19 versions & 1 rubygems