Class: Btc::Client
Instance Method Summary collapse
-
#initialize(settings = {}) ⇒ Client
constructor
A new instance of Client.
- #method_missing(method, *args) ⇒ Object
Constructor Details
#initialize(settings = {}) ⇒ Client
Returns a new instance of Client.
6 7 8 9 10 11 12 |
# File 'lib/btc/client.rb', line 6 def initialize(settings={}) # covert hash key to symbol # http://stackoverflow.com/questions/800122/best-way-to-convert-strings-to-symbols-in-hash @settings = Btc::Settings && Btc::Settings.btc.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo} @settings ||= {} @settings.merge! settings end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method