Sha256: 1e06b822b07eac66269129ac411b5407ac50606d3c57bc11ba084e9b42586c50

Contents?: true

Size: 696 Bytes

Versions: 14

Compression:

Stored size: 696 Bytes

Contents

# Aruba
module Aruba
  # Basic Configuration
  #
  class BasicConfiguration
    # A configuration option
    #
    # @private
    class Option
      attr_accessor :name, :value
      attr_reader :default_value

      # Create option
      def initialize(opts = {})
        name = opts[:name]
        value = opts[:value]

        raise ArgumentError, '"name" is required' unless opts.key? :name
        raise ArgumentError, '"value" is required' unless opts.key? :value

        @name          = name
        @value         = value
        @default_value = value
      end

      # Compare option
      def ==(other)
        name == other.name && value == other.value
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 3 rubygems

Version Path
honeybadger-5.4.0 vendor/bundle/ruby/3.2.0/gems/aruba-2.2.0/lib/aruba/basic_configuration/option.rb
honeybadger-5.3.0 vendor/bundle/ruby/3.2.0/gems/aruba-2.2.0/lib/aruba/basic_configuration/option.rb
aruba-2.2.0 lib/aruba/basic_configuration/option.rb
aruba-2.1.0 lib/aruba/basic_configuration/option.rb
aruba-2.0.1 lib/aruba/basic_configuration/option.rb
phillipug-foodie-0.1.0 .vendor/ruby/3.0.0/gems/aruba-2.0.0/lib/aruba/basic_configuration/option.rb
aruba-2.0.0 lib/aruba/basic_configuration/option.rb
aruba-1.1.2 lib/aruba/basic_configuration/option.rb
aruba-1.1.1 lib/aruba/basic_configuration/option.rb
aruba-1.1.0 lib/aruba/basic_configuration/option.rb
aruba-1.0.4 lib/aruba/basic_configuration/option.rb
aruba-1.0.3 lib/aruba/basic_configuration/option.rb
aruba-1.0.2 lib/aruba/basic_configuration/option.rb
aruba-1.0.1 lib/aruba/basic_configuration/option.rb