Class: SaasRunner::Resource::Event
- Inherits:
-
Object
- Object
- SaasRunner::Resource::Event
- Defined in:
- lib/saas_runner/resource/event.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
- #destroy!(id, params = {}) ⇒ Object
- #index(params = {}) ⇒ Object
-
#initialize(client) ⇒ Event
constructor
A new instance of Event.
- #show(id, params = {}) ⇒ Object
Constructor Details
#initialize(client) ⇒ Event
Returns a new instance of Event.
6 7 8 |
# File 'lib/saas_runner/resource/event.rb', line 6 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
4 5 6 |
# File 'lib/saas_runner/resource/event.rb', line 4 def client @client end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
4 5 6 |
# File 'lib/saas_runner/resource/event.rb', line 4 def response @response end |
Instance Method Details
#destroy!(id, params = {}) ⇒ Object
20 21 22 23 |
# File 'lib/saas_runner/resource/event.rb', line 20 def destroy!(id, params = {}) @response = client.delete("/events/#{id}", params) @response.body end |
#index(params = {}) ⇒ Object
10 11 12 13 |
# File 'lib/saas_runner/resource/event.rb', line 10 def index(params = {}) @response = client.get('/events', params) @response.body end |
#show(id, params = {}) ⇒ Object
15 16 17 18 |
# File 'lib/saas_runner/resource/event.rb', line 15 def show(id, params = {}) @response = client.get("/events/#{id}", params) @response.body end |