Class: Cb::Config
- Inherits:
-
Object
- Object
- Cb::Config
- Defined in:
- lib/cb/config.rb
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #set_base_uri(uri) ⇒ Object
- #to_hash ⇒ Object
Constructor Details
#initialize ⇒ Config
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_hash ⇒ Object
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 |