module AppleDEPClient::Configuration
Constants
- DEP_CONFIG
Public Instance Methods
configure() { |self| ... }
click to toggle source
# File lib/apple_dep_client/configuration.rb, line 40 def configure yield self end
get_default_value(key)
click to toggle source
# File lib/apple_dep_client/configuration.rb, line 36 def get_default_value(key) DEP_CONFIG[key.to_sym] end
get_value(m)
click to toggle source
# File lib/apple_dep_client/configuration.rb, line 30 def get_value(m) value = instance_variable_get("@#{m}") value = get_default_value(m) if value.nil? (value.is_a? Proc) ? value.call : value end
method_missing(m, *_args, &_block)
click to toggle source
# File lib/apple_dep_client/configuration.rb, line 22 def method_missing(m, *_args, &_block) if DEP_CONFIG.keys.include? m.to_sym get_value(m) else raise NoMethodError, "Unknown method #{m}" end end