Class: Cryptowatch::Wrapper

Inherits:
Object
  • Object
show all
Defined in:
lib/cryptowatch/wrapper.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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(options = nil)
  if options == nil
    options = {
      :timeout            => 5,
      :display_infos      => true,
      :display_errors     => true
    }
  end
  @rest_adapter = RestClientAdapter.new(options)
end

Instance Attribute Details

#rest_adapterObject

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