Sha256: b76241dc2ccf7281dfa2fa80af18723a317ebcdd0edf11400140ad715bb2e83b
Contents?: true
Size: 450 Bytes
Versions: 14
Compression:
Stored size: 450 Bytes
Contents
class ApiConfiguration attr_accessor :protocol, :host, :namespace, :port, :verbosity, :priority # initializes a configuration object from given YAML file for given environment def initialize(raw_config, env) raw_config[env.to_s].each { |key, value| self.instance_variable_set("@#{key}", value) } self.verbosity = raw_config['general']['verbosity'].first self.priority = raw_config['general']['priority'] || 0 self end end
Version data entries
14 entries across 14 versions & 1 rubygems