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.
4 5 6 7 |
# File 'lib/cb/config.rb', line 4 def initialize Cb::Utils::Country.inject_convenience_methods set_defaults end |
Instance Method Details
#set_base_uri(uri) ⇒ Object
21 22 23 |
# File 'lib/cb/config.rb', line 21 def set_base_uri(uri) @base_uri = uri end |
#to_hash ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/cb/config.rb', line 9 def to_hash hash = {} instance_variables.each do |instance_variable| attribute = instance_variable[1..-1].to_sym hash[attribute] = send attribute end hash end |