class Aruba::InConfigWrapper

In config wrapper

Used to make the configuration read only if one needs to access an configuration option from with ‘Aruba::Config`.

@private

Attributes

config[R]

Public Class Methods

new(config) click to toggle source
# File lib/aruba/in_config_wrapper.rb, line 13
def initialize(config)
  @config = config.dup
end

Public Instance Methods

method_missing(name, *args) click to toggle source
Calls superclass method
# File lib/aruba/in_config_wrapper.rb, line 17
def method_missing(name, *args)
  if config.key? name
    raise ArgumentError, "Options take no argument" if args.any?

    config[name]
  else
    super
  end
end
respond_to_missing?(name, _include_private) click to toggle source
# File lib/aruba/in_config_wrapper.rb, line 27
def respond_to_missing?(name, _include_private)
  config.key? name
end