Sha256: 526927dcca4bd0844d74c84d697cd0e1e4b47a04a9c017b07b46f173ef2d94e5

Contents?: true

Size: 971 Bytes

Versions: 36

Compression:

Stored size: 971 Bytes

Contents

# frozen_string_literal: true

module ActiveObject
  class Configuration

    attr_accessor :autoload_array, :autoload_date, :autoload_enumerable, :autoload_hash,
                  :autoload_integer, :autoload_kernel, :autoload_numeric, :autoload_object,
                  :autoload_range, :autoload_string, :autoload_time

    # rubocop:disable Metrics/MethodLength
    def initialize
      @autoload_array = true
      @autoload_date = true
      @autoload_enumerable = true
      @autoload_hash = true
      @autoload_integer = true
      @autoload_kernel = true
      @autoload_numeric = true
      @autoload_object = true
      @autoload_range = true
      @autoload_string = true
      @autoload_time = true
    end
    # rubocop:enable Metrics/MethodLength

  end

  def self.configuration
    @configuration ||= Configuration.new
  end

  def self.configuration=(config)
    @configuration = config
  end

  def self.configure
    yield(configuration)
  end

end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
active_object-5.14.1 lib/active_object/configuration.rb
active_object-5.14.0 lib/active_object/configuration.rb
active_object-5.13.0 lib/active_object/configuration.rb
active_object-5.12.0 lib/active_object/configuration.rb
active_object-5.11.0 lib/active_object/configuration.rb
active_object-5.10.0 lib/active_object/configuration.rb
active_object-5.9.0 lib/active_object/configuration.rb
active_object-5.8.11 lib/active_object/configuration.rb
active_object-5.8.10 lib/active_object/configuration.rb
active_object-5.8.9 lib/active_object/configuration.rb
active_object-5.8.8 lib/active_object/configuration.rb
active_object-5.8.7 lib/active_object/configuration.rb
active_object-5.8.6 lib/active_object/configuration.rb
active_object-5.8.5 lib/active_object/configuration.rb
active_object-5.8.4 lib/active_object/configuration.rb
active_object-5.8.3 lib/active_object/configuration.rb
active_object-5.8.2 lib/active_object/configuration.rb
active_object-5.8.1 lib/active_object/configuration.rb
active_object-5.8.0 lib/active_object/configuration.rb
active_object-5.7.0 lib/active_object/configuration.rb