Sha256: db6f9da13f44ee8a0116bcd8749d679f2b9c0b935f4f622fc23f399510e3a3b1
Contents?: true
Size: 635 Bytes
Versions: 113
Compression:
Stored size: 635 Bytes
Contents
module FactoryGirl # @api private class Trait attr_reader :name, :definition def initialize(name, &block) @name = name @block = block @definition = Definition.new(@name) proxy = FactoryGirl::DefinitionProxy.new(@definition) proxy.instance_eval(&@block) if block_given? end delegate :add_callback, :declare_attribute, :to_create, :define_trait, :constructor, :callbacks, :attributes, to: :@definition def names [@name] end def ==(other) name == other.name && block == other.block end protected attr_reader :block end end
Version data entries
113 entries across 100 versions & 12 rubygems