Class: Cryptowatch::Wrapper
- Inherits:
-
Object
- Object
- Cryptowatch::Wrapper
- Defined in:
- lib/cryptowatch/wrapper.rb
Instance Attribute Summary collapse
-
#rest_adapter ⇒ Object
Returns the value of attribute rest_adapter.
Instance Method Summary collapse
- #get(url) ⇒ Object
-
#initialize(options = nil) ⇒ Wrapper
constructor
A new instance of Wrapper.
Constructor Details
#initialize(options = nil) ⇒ Wrapper
Returns a new instance of Wrapper.
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/cryptowatch/wrapper.rb', line 15 def initialize( = nil) if == nil = { :timeout => 5, :display_infos => true, :display_errors => true } end @rest_adapter = RestClientAdapter.new() end |
Instance Attribute Details
#rest_adapter ⇒ Object
Returns the value of attribute rest_adapter.
13 14 15 |
# File 'lib/cryptowatch/wrapper.rb', line 13 def rest_adapter @rest_adapter end |
Instance Method Details
#get(url) ⇒ Object
26 27 28 |
# File 'lib/cryptowatch/wrapper.rb', line 26 def get(url) return @rest_adapter.get(url) end |