Sha256: a9595b1110a203dc9051724a0cdde19148f13ee9ac771ba3a3fdf29f5fe95901
Contents?: true
Size: 627 Bytes
Versions: 6
Compression:
Stored size: 627 Bytes
Contents
module FactoryBot class Declaration # @api private class Association < Declaration def initialize(name, *options) super(name, false) @options = options.dup @overrides = options.extract_options! @traits = options end def ==(other) name == other.name && options == other.options end protected attr_reader :options private def build factory_name = @overrides[:factory] || name [Attribute::Association.new(name, factory_name, [@traits, @overrides.except(:factory)].flatten)] end end end end
Version data entries
6 entries across 6 versions & 1 rubygems