Sha256: 4ea159343a7382b15190be607df9ccaa6818549de5c8f274a573e64094e7d84d

Contents?: true

Size: 869 Bytes

Versions: 9

Compression:

Stored size: 869 Bytes

Contents

# frozen_string_literal: true

module Necromancer
  # A global configuration for converters.
  #
  # Used internally by {Necromancer::Context}.
  #
  # @api private
  class Configuration
    # Configure global strict mode
    #
    # @api public
    attr_writer :strict

    # Configure global copy mode
    #
    # @api public
    attr_writer :copy

    # Create a configuration
    #
    # @api private
    def initialize
      @strict = false
      @copy   = true
    end

    # Set or get strict mode
    #
    # @return [Boolean]
    #
    # @api public
    def strict(value = (not_set = true))
      not_set ? @strict : (self.strict = value)
    end

    # Set or get copy mode
    #
    # @return [Boolean]
    #
    # @api public
    def copy(value = (not_set = true))
      not_set ? @copy : (self.copy = value)
    end
  end # Configuration
end # Necromancer

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
necromancer-0.7.0 lib/necromancer/configuration.rb
pokedex-terminal-0.2.8 vendor/bundle/ruby/2.7.0/gems/necromancer-0.5.1/lib/necromancer/configuration.rb
pokedex-terminal-0.2.7 vendor/bundle/ruby/2.7.0/gems/necromancer-0.5.1/lib/necromancer/configuration.rb
pokedex-terminal-0.2.6 vendor/bundle/ruby/2.7.0/gems/necromancer-0.5.1/lib/necromancer/configuration.rb
pokedex-terminal-0.2.5 vendor/bundle/ruby/2.7.0/gems/necromancer-0.5.1/lib/necromancer/configuration.rb
pokedex-terminal-0.2.4 vendor/bundle/ruby/2.7.0/gems/necromancer-0.5.1/lib/necromancer/configuration.rb
necromancer-0.6.0 lib/necromancer/configuration.rb
necromancer-0.5.1 lib/necromancer/configuration.rb
necromancer-0.5.0 lib/necromancer/configuration.rb