Sha256: 8c84dad1d72b52564497f4d28295940ae35343d9851ab34be0a34b9014a651fc

Contents?: true

Size: 694 Bytes

Versions: 30

Compression:

Stored size: 694 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]

        fail ArgumentError, '"name" is required' unless opts.key? :name
        fail 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

30 entries across 30 versions & 3 rubygems

Version Path
aruba-1.0.0 lib/aruba/basic_configuration/option.rb
aruba-0.14.14 lib/aruba/basic_configuration/option.rb
aruba-0.14.13 lib/aruba/basic_configuration/option.rb
aruba-1.0.0.pre.alpha.5 lib/aruba/basic_configuration/option.rb
honeybadger-4.5.3 vendor/bundle/ruby/2.6.0/gems/aruba-0.14.12/lib/aruba/basic_configuration/option.rb
aruba-0.14.12 lib/aruba/basic_configuration/option.rb
aruba-0.14.11 lib/aruba/basic_configuration/option.rb
aruba-0.14.10 lib/aruba/basic_configuration/option.rb
aruba-1.0.0.pre.alpha.4 lib/aruba/basic_configuration/option.rb
aruba-1.0.0.pre.alpha.3 lib/aruba/basic_configuration/option.rb
aruba-0.14.9 lib/aruba/basic_configuration/option.rb
aruba-0.14.8 lib/aruba/basic_configuration/option.rb
aruba-0.14.7 lib/aruba/basic_configuration/option.rb
aruba-0.14.6 lib/aruba/basic_configuration/option.rb
aruba-0.14.5 lib/aruba/basic_configuration/option.rb
aruba-0.14.4 lib/aruba/basic_configuration/option.rb
aruba-0.14.3 lib/aruba/basic_configuration/option.rb
aruba-1.0.0.pre.alpha.2 lib/aruba/basic_configuration/option.rb
aruba-1.0.0.pre.alpha.1 lib/aruba/basic_configuration/option.rb
aruba-win-fix-0.14.2 lib/aruba/basic_configuration/option.rb