Class: Bestchange::Api

Inherits:
Object
  • Object
show all
Defined in:
lib/bestchange/api.rb

Constant Summary collapse

BASE_URI =
'http://api.bestchange.ru/info.zip'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(conn = default_conn) ⇒ Api

Returns a new instance of Api.



13
14
15
# File 'lib/bestchange/api.rb', line 13

def initialize(conn = default_conn)
  @conn = conn
end

Instance Attribute Details

#connObject (readonly)

Returns the value of attribute conn.



17
18
19
# File 'lib/bestchange/api.rb', line 17

def conn
  @conn
end

Instance Method Details

#request(request = default_request) ⇒ Object



19
20
21
# File 'lib/bestchange/api.rb', line 19

def request(request = default_request)
  conn.request(request)
end