Sha256: 61c9bffba04badae1b48c2da2a16f3e633609bf58d2bd102d979f92e2f87ec66

Contents?: true

Size: 415 Bytes

Versions: 14

Compression:

Stored size: 415 Bytes

Contents

module Aruba
  class ConfigWrapper
    attr_reader :config
    private :config

    def initialize(config)
      @config = config.dup
    end

    def method_missing(name, *args)
      fail ArgumentError, 'Options take no argument' if args.count > 0
      fail UnknownOptionError, %(Option "#{name}" is unknown. Please use only earlier defined options) unless config.key? name

      config[name]
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
aruba-0.11.0.pre lib/aruba/config_wrapper.rb
aruba-0.10.2 lib/aruba/config_wrapper.rb
aruba-0.10.1 lib/aruba/config_wrapper.rb
aruba-0.10.0 lib/aruba/config_wrapper.rb
aruba-0.10.0.pre2 lib/aruba/config_wrapper.rb
aruba-0.10.0.pre lib/aruba/config_wrapper.rb
aruba-0.9.0 lib/aruba/config_wrapper.rb
aruba-0.9.0.pre2 lib/aruba/config_wrapper.rb
aruba-0.9.0.pre lib/aruba/config_wrapper.rb
aruba-0.8.1 lib/aruba/config_wrapper.rb
aruba-0.8.0 lib/aruba/config_wrapper.rb
aruba-0.8.0.pre3 lib/aruba/config_wrapper.rb
aruba-0.8.0.pre2 lib/aruba/config_wrapper.rb
aruba-0.8.0.pre lib/aruba/config_wrapper.rb