Class: RhoGallery::Consumer
- Inherits:
-
Base
- Object
- Base
- RhoGallery::Consumer
show all
- Defined in:
- lib/rhogallery/consumer.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
#errors, #id, #initialize
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class RhoGallery::Base
Class Method Details
.find(id = "", options = RhoGallery.credentials) ⇒ Object
.find_all(options = RhoGallery.credentials) ⇒ Object
Instance Method Details
#create(data = @attributes, options = RhoGallery.credentials, resource = "consumers") ⇒ Object
3
4
5
|
# File 'lib/rhogallery/consumer.rb', line 3
def create(data = @attributes, options = RhoGallery.credentials, resource = "consumers")
super(data, options, resource)
end
|
#delete(options = RhoGallery.credentials, resource = "consumers/#{self.id}") ⇒ Object
20
21
22
|
# File 'lib/rhogallery/consumer.rb', line 20
def delete(options = RhoGallery.credentials, resource = "consumers/#{self.id}")
super(options, resource)
end
|
#save(data = @attributes, options = RhoGallery.credentials, resource = "consumers") ⇒ Object
7
8
9
|
# File 'lib/rhogallery/consumer.rb', line 7
def save(data = @attributes, options = RhoGallery.credentials, resource = "consumers")
super(data, options, resource)
end
|
#update(data = @attributes, options = RhoGallery.credentials, resource = "consumers/#{self.id}") ⇒ Object
11
12
13
14
15
16
17
18
|
# File 'lib/rhogallery/consumer.rb', line 11
def update(data = @attributes, options = RhoGallery.credentials, resource = "consumers/#{self.id}")
if super(data, options, resource)
@attributes = RhoGallery::Consumer::find(self.id, options).get_attributes
self
else
false
end
end
|