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

Version Path
apirunner-0.3.8 lib/api_configuration.rb
apirunner-0.3.7 lib/api_configuration.rb
apirunner-0.3.6 lib/api_configuration.rb
apirunner-0.3.5 lib/api_configuration.rb
apirunner-0.3.4 lib/api_configuration.rb
apirunner-0.3.3 lib/api_configuration.rb
apirunner-0.3.2 lib/api_configuration.rb
apirunner-0.3.1 lib/api_configuration.rb
apirunner-0.3.0 lib/api_configuration.rb
apirunner-0.2.8 lib/api_configuration.rb
apirunner-0.2.7 lib/api_configuration.rb
apirunner-0.2.6 lib/api_configuration.rb
apirunner-0.2.5 lib/api_configuration.rb
apirunner-0.2.4 lib/api_configuration.rb