Class: CircuitClient::SendMessageCli::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/circuit_client/send_message_cli.rb

Constant Summary collapse

DEFAULTS =
{
  timeout: 60,
  host: 'eu.yourcircuit.com',
  client_id: nil,
  client_secret: nil,
  auth_scope: 'ALL'
}

Class Method Summary collapse

Class Method Details

.load_config(path) ⇒ Object



16
17
18
# File 'lib/circuit_client/send_message_cli.rb', line 16

def self.load_config(path)
  @@data = YAML.load_file(path)
end

.method_missing(method_name) ⇒ Object



20
21
22
23
24
25
26
# File 'lib/circuit_client/send_message_cli.rb', line 20

def self.method_missing(method_name)
  if DEFAULTS.has_key?(method_name)
    @@data[method_name.to_s] || DEFAULTS[method_name]
  else
    super
  end
end