Sha256: 6f68d1b8e6975a194ebd7327a607409462a53697d59d682a0621731802eab8b0
Contents?: true
Size: 613 Bytes
Versions: 11
Compression:
Stored size: 613 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 run_callbacks(:after_build) @instance end end end end
Version data entries
11 entries across 11 versions & 5 rubygems