Sha256: 41134db819425c1b7da1704c0b250118175faf5ece0fdb9104ae60982d9d8b37

Contents?: true

Size: 1.05 KB

Versions: 14

Compression:

Stored size: 1.05 KB

Contents

# frozen_string_literal: true

module RuboCop
  # RuboCop factory_bot project namespace
  module FactoryBot
    ATTRIBUTE_DEFINING_METHODS = %i[
      factory
      ignore
      trait
      traits_for_enum
      transient
    ].freeze

    UNPROXIED_METHODS = %i[
      __send__
      __id__
      nil?
      send
      object_id
      extend
      instance_eval
      initialize
      block_given?
      raise
      caller
      method
    ].freeze

    DEFINITION_PROXY_METHODS = %i[
      add_attribute
      after
      association
      before
      callback
      ignore
      initialize_with
      sequence
      skip_create
      to_create
    ].freeze

    RESERVED_METHODS =
      DEFINITION_PROXY_METHODS +
      UNPROXIED_METHODS +
      ATTRIBUTE_DEFINING_METHODS

    private_constant(
      :ATTRIBUTE_DEFINING_METHODS,
      :UNPROXIED_METHODS,
      :DEFINITION_PROXY_METHODS,
      :RESERVED_METHODS
    )

    def self.attribute_defining_methods
      ATTRIBUTE_DEFINING_METHODS
    end

    def self.reserved_methods
      RESERVED_METHODS
    end
  end
end

Version data entries

14 entries across 14 versions & 5 rubygems

Version Path
katalyst-govuk-formbuilder-1.9.2 vendor/bundle/ruby/3.3.0/gems/rubocop-factory_bot-2.26.1/lib/rubocop/factory_bot/factory_bot.rb
rubocop-factory_bot-2.26.1 lib/rubocop/factory_bot/factory_bot.rb
rubocop-factory_bot-2.26.0 lib/rubocop/factory_bot/factory_bot.rb
mlh-rubocop-config-1.0.3 vendor/bundle/ruby/3.2.0/gems/rubocop-factory_bot-2.25.1/lib/rubocop/factory_bot/factory_bot.rb
rubocop-factory_bot-2.25.1 lib/rubocop/factory_bot/factory_bot.rb
rubocop-factory_bot-2.25.0 lib/rubocop/factory_bot/factory_bot.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/rubocop-factory_bot-2.23.1/lib/rubocop/factory_bot/factory_bot.rb
rubocop-factory_bot-2.24.0 lib/rubocop/factory_bot/factory_bot.rb
mlh-rubocop-config-1.0.2 vendor/bundle/ruby/3.2.0/gems/rubocop-factory_bot-2.23.1/lib/rubocop/factory_bot/factory_bot.rb
fablicop-1.10.3 vendor/bundle/ruby/3.2.0/gems/rubocop-factory_bot-2.23.1/lib/rubocop/factory_bot/factory_bot.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/rubocop-factory_bot-2.23.1/lib/rubocop/factory_bot/factory_bot.rb
fablicop-1.10.2 vendor/bundle/ruby/3.2.0/gems/rubocop-factory_bot-2.23.1/lib/rubocop/factory_bot/factory_bot.rb
rubocop-factory_bot-2.23.1 lib/rubocop/factory_bot/factory_bot.rb
rubocop-factory_bot-2.23.0 lib/rubocop/factory_bot/factory_bot.rb