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-0.14.2 lib/aruba/basic_configuration/option.rb
aruba-0.14.1 lib/aruba/basic_configuration/option.rb
aruba-0.14.0 lib/aruba/basic_configuration/option.rb
aruba-0.13.0 lib/aruba/basic_configuration/option.rb
aruba-0.12.0 lib/aruba/basic_configuration/option.rb
aruba-0.11.2 lib/aruba/basic_configuration/option.rb
aruba-0.11.1 lib/aruba/basic_configuration/option.rb
aruba-0.11.0.pre4 lib/aruba/basic_configuration/option.rb
aruba-0.11.0.pre3 lib/aruba/basic_configuration/option.rb
aruba-0.11.0.pre2 lib/aruba/basic_configuration/option.rb