Module: ClassyResources::Sequel
- Defined in:
- lib/classy_resources/sequel.rb
Defined Under Namespace
Classes: ResourceNotFound
Instance Method Summary
collapse
Instance Method Details
#build_object(resource, object_params) ⇒ Object
11
12
13
|
# File 'lib/classy_resources/sequel.rb', line 11
def build_object(resource, object_params)
class_for(resource).new(object_params)
end
|
#destroy_object(object) ⇒ Object
25
26
27
|
# File 'lib/classy_resources/sequel.rb', line 25
def destroy_object(object)
object.destroy
end
|
#load_collection(resource) ⇒ Object
#load_object(resource, id) ⇒ Object
#update_object(object, params) ⇒ Object
21
22
23
|
# File 'lib/classy_resources/sequel.rb', line 21
def update_object(object, params)
object.set params
end
|