Sha256: 449104a29379c5649ebeea690348f1b610800767397a8efc09b0eb61c04b58a0

Contents?: true

Size: 478 Bytes

Versions: 28

Compression:

Stored size: 478 Bytes

Contents

require "factory_bot/attribute/dynamic"
require "factory_bot/attribute/association"
require "factory_bot/attribute/sequence"

module FactoryBot
  # @api private
  class Attribute
    attr_reader :name, :ignored

    def initialize(name, ignored)
      @name = name.to_sym
      @ignored = ignored
    end

    def to_proc
      -> {}
    end

    def association?
      false
    end

    def alias_for?(attr)
      FactoryBot.aliases_for(attr).include?(name)
    end
  end
end

Version data entries

28 entries across 27 versions & 3 rubygems

Version Path
factory_bot-6.5.1 lib/factory_bot/attribute.rb
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.1.0/gems/factory_bot-6.5.0/lib/factory_bot/attribute.rb
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.3.0/gems/factory_bot-6.5.0/lib/factory_bot/attribute.rb
factory_bot-6.5.0 lib/factory_bot/attribute.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/factory_bot-6.4.6/lib/factory_bot/attribute.rb
factory_bot-6.4.6 lib/factory_bot/attribute.rb
factory_bot-6.4.5 lib/factory_bot/attribute.rb
factory_bot-6.4.4 lib/factory_bot/attribute.rb
factory_bot-6.4.3 lib/factory_bot/attribute.rb
factory_bot-6.4.2 lib/factory_bot/attribute.rb
factory_bot-6.4.1 lib/factory_bot/attribute.rb
factory_bot-6.4.0 lib/factory_bot/attribute.rb
factory_bot-6.3.0 lib/factory_bot/attribute.rb
factory_bot-6.2.1 lib/factory_bot/attribute.rb
factory_bot-6.2.0 lib/factory_bot/attribute.rb
factory_bot-6.1.0 lib/factory_bot/attribute.rb
factory_bot-6.0.2 lib/factory_bot/attribute.rb
factory_bot-6.0.1 lib/factory_bot/attribute.rb
factory_bot-6.0.0 lib/factory_bot/attribute.rb
factory_bot-5.2.0 lib/factory_bot/attribute.rb