Class: Esbit::Connection
- Inherits:
-
Object
- Object
- Esbit::Connection
- Defined in:
- lib/esbit/connection.rb
Instance Method Summary collapse
- #get(path, params = {}) ⇒ Object
-
#initialize(campfire) ⇒ Connection
constructor
A new instance of Connection.
- #post(path, params = {}) ⇒ Object
Constructor Details
#initialize(campfire) ⇒ Connection
Returns a new instance of Connection.
3 4 5 |
# File 'lib/esbit/connection.rb', line 3 def initialize(campfire) @campfire = campfire end |
Instance Method Details
#get(path, params = {}) ⇒ Object
7 8 9 10 11 |
# File 'lib/esbit/connection.rb', line 7 def get(path, params = {}) make_request do RestClient.get request_url(path), params end end |
#post(path, params = {}) ⇒ Object
13 14 15 16 17 |
# File 'lib/esbit/connection.rb', line 13 def post(path, params = {}) make_request do RestClient.post request_url(path), params end end |