Sha256: c9354d864064c77a3def0bd57aff71691bf41686a43d56a9c2399766b36b97fe
Contents?: true
Size: 729 Bytes
Versions: 19
Compression:
Stored size: 729 Bytes
Contents
# frozen_string_literal: true # ProxyRb module ProxyRb # Basic Configuration class BasicConfiguration # In config wrapper # # Used to make the configuration read only if one needs to access an # configuration option from with `ProxyRb::Config`. # # @private class InConfigurationWrapper attr_reader :config private :config def initialize(config) @config = config.dup end def method_missing(name, *args) raise ArgumentError, 'Options take no argument' if args.count > 0 raise UnknownOptionError, %(Option "#{name}" is unknown. Please use only earlier defined options) unless config.key? name config[name] end end end end
Version data entries
19 entries across 19 versions & 1 rubygems