Sha256: a260cfbd8213619cccf4746d47038d0a637c2afe39f0a55b032031a83ef1dcda

Contents?: true

Size: 499 Bytes

Versions: 151

Compression:

Stored size: 499 Bytes

Contents

module FactoryGirl
  class Declaration
    class Association < Declaration
      def initialize(name, options)
        super(name, false)
        @options = options
      end

      def ==(other)
        name == other.name &&
          options == other.options
      end

      protected
      attr_reader :options

      private

      def build
        factory_name = @options.delete(:factory) || name
        [Attribute::Association.new(name, factory_name, @options)]
      end
    end
  end
end

Version data entries

151 entries across 96 versions & 7 rubygems

Version Path
classiccms-0.5.14 vendor/bundle/gems/factory_girl-3.2.0/lib/factory_girl/declaration/association.rb
classiccms-0.5.13 vendor/bundle/gems/factory_girl-3.0.0/lib/factory_girl/declaration/association.rb
classiccms-0.5.13 vendor/bundle/gems/factory_girl-3.2.0/lib/factory_girl/declaration/association.rb
classiccms-0.5.12 vendor/bundle/gems/factory_girl-3.2.0/lib/factory_girl/declaration/association.rb
classiccms-0.5.12 vendor/bundle/gems/factory_girl-3.0.0/lib/factory_girl/declaration/association.rb
classiccms-0.5.11 vendor/bundle/gems/factory_girl-3.0.0/lib/factory_girl/declaration/association.rb
classiccms-0.5.11 vendor/bundle/gems/factory_girl-3.2.0/lib/factory_girl/declaration/association.rb
classiccms-0.5.10 vendor/bundle/gems/factory_girl-3.2.0/lib/factory_girl/declaration/association.rb
classiccms-0.5.10 vendor/bundle/gems/factory_girl-3.0.0/lib/factory_girl/declaration/association.rb
classiccms-0.5.9 vendor/bundle/gems/factory_girl-3.2.0/lib/factory_girl/declaration/association.rb
classiccms-0.5.9 vendor/bundle/gems/factory_girl-3.0.0/lib/factory_girl/declaration/association.rb
classiccms-0.5.8 vendor/bundle/gems/factory_girl-3.0.0/lib/factory_girl/declaration/association.rb
classiccms-0.5.8 vendor/bundle/gems/factory_girl-3.2.0/lib/factory_girl/declaration/association.rb
classiccms-0.5.7 vendor/bundle/gems/factory_girl-3.0.0/lib/factory_girl/declaration/association.rb
classiccms-0.5.7 vendor/bundle/gems/factory_girl-3.2.0/lib/factory_girl/declaration/association.rb
classiccms-0.5.6 vendor/bundle/gems/factory_girl-3.0.0/lib/factory_girl/declaration/association.rb
classiccms-0.5.6 vendor/bundle/gems/factory_girl-3.2.0/lib/factory_girl/declaration/association.rb
classiccms-0.5.5 vendor/bundle/gems/factory_girl-3.2.0/lib/factory_girl/declaration/association.rb
classiccms-0.5.5 vendor/bundle/gems/factory_girl-3.0.0/lib/factory_girl/declaration/association.rb
classiccms-0.5.2 vendor/bundle/gems/factory_girl-3.0.0/lib/factory_girl/declaration/association.rb