Class: Start::BaseResource
- Inherits:
-
Object
- Object
- Start::BaseResource
- Defined in:
- lib/start/base_resource.rb
Class Attribute Summary collapse
-
.path ⇒ Object
Returns the value of attribute path.
Class Method Summary collapse
Class Attribute Details
.path ⇒ Object
Returns the value of attribute path.
4 5 6 |
# File 'lib/start/base_resource.rb', line 4 def path @path end |
Class Method Details
.all ⇒ Object
14 15 16 |
# File 'lib/start/base_resource.rb', line 14 def all handle_response Start.get(path) end |
.create(params = {}) ⇒ Object
6 7 8 |
# File 'lib/start/base_resource.rb', line 6 def create(params = {}) handle_response Start.post(path, body: params) end |
.get(id) ⇒ Object
10 11 12 |
# File 'lib/start/base_resource.rb', line 10 def get(id) handle_response Start.post("#{path}/#{id}") end |