Sha256: ddc45de2898242030e7d76ff6a54ab69b68123bfc2facdb4e0e878baed3bbde9
Contents?: true
Size: 577 Bytes
Versions: 15
Compression:
Stored size: 577 Bytes
Contents
class Factory class Proxy #:nodoc: class Build < Proxy #:nodoc: def initialize(klass) @instance = klass.new end def get(attribute) @instance.send(attribute) end def set(attribute, value) @instance.send(:"#{attribute}=", value) end def associate(name, factory, attributes) set(name, Factory.create(factory, attributes)) end def association(factory, overrides = {}) Factory.create(factory, overrides) end def result @instance end end end end
Version data entries
15 entries across 15 versions & 8 rubygems