Class: Thingdeck::NestedItem
- Inherits:
-
Object
- Object
- Thingdeck::NestedItem
show all
- Defined in:
- lib/thingdeck/nested_item.rb
Instance Method Summary
collapse
Constructor Details
#initialize(wrapper, parent, uri) ⇒ NestedItem
Returns a new instance of NestedItem.
3
4
5
6
7
|
# File 'lib/thingdeck/nested_item.rb', line 3
def initialize(wrapper, parent, uri)
@wrapper = wrapper
@parent = parent
@uri = uri
end
|
Instance Method Details
#all(pid, params = {}) ⇒ Object
9
10
11
|
# File 'lib/thingdeck/nested_item.rb', line 9
def all(pid, params = {})
@wrapper.perform_request { |c| c.get(url(pid), params) }
end
|
#create(pid, params) ⇒ Object
21
22
23
|
# File 'lib/thingdeck/nested_item.rb', line 21
def create(pid, params)
@wrapper.perform_request { |c| c.post(url(pid), params) }
end
|
#destroy(pid, id) ⇒ Object
25
26
27
|
# File 'lib/thingdeck/nested_item.rb', line 25
def destroy(pid, id)
@wrapper.perform_request { |c| c.delete(url(pid, id)) }
end
|
#find(pid, id, params = {}) ⇒ Object
13
14
15
|
# File 'lib/thingdeck/nested_item.rb', line 13
def find(pid, id, params = {})
@wrapper.perform_request { |c| c.get(url(pid, id), params) }
end
|
#update(pid, id, params) ⇒ Object
17
18
19
|
# File 'lib/thingdeck/nested_item.rb', line 17
def update(pid, id, params)
@wrapper.perform_request { |c| c.put(url(pid, id), params) }
end
|