Class: Cb::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/cb/config.rb

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



13
14
15
16
# File 'lib/cb/config.rb', line 13

def initialize
  Cb::Utils::Country.inject_convenience_methods
  set_defaults
end

Instance Method Details

#set_base_uri(uri) ⇒ Object



30
31
32
# File 'lib/cb/config.rb', line 30

def set_base_uri(uri)
  @base_uri = uri
end

#to_hashObject



18
19
20
21
22
23
24
25
26
27
28
# File 'lib/cb/config.rb', line 18

def to_hash
  hash = {}

  instance_variables.each do |instance_variable|
    attribute = instance_variable[1..-1].to_sym

    hash[attribute] = send attribute
  end

  hash
end