module ElasticAPM::Config::Options::InstanceMethods
@api private
Public Instance Methods
[](key)
click to toggle source
# File lib/elastic_apm/config/options.rb, line 136 def [](key) options[key] end
Also aliased as: get
load_schema()
click to toggle source
# File lib/elastic_apm/config/options.rb, line 111 def load_schema Hash[self.class.schema.map do |key, args| [key, Option.new(key, **args)] end] end
method_missing(name, *value)
click to toggle source
Calls superclass method
# File lib/elastic_apm/config/options.rb, line 117 def method_missing(name, *value) name_str = name.to_s if name_str.end_with?('=') key = name_str[0...-1].to_sym set(key, value.first) elsif name_str.end_with?('?') key = name_str[0...-1].to_sym options.key?(key) ? options[key].value : super elsif options.key?(name) options.fetch(name).value else super end end
set(key, value)
click to toggle source
# File lib/elastic_apm/config/options.rb, line 141 def set(key, value) options.fetch(key.to_sym).set(value) rescue KeyError warn format("Unknown option '%s'", key) nil end