Module: Hanami::Repository::Commands
- Defined in:
- lib/hanami/repository.rb
Overview
Extend commands from ROM::Repository with error management
Instance Method Summary collapse
-
#create(*args) ⇒ Hanami::Entity
Create a new record.
-
#delete(*args) ⇒ Hanami::Entity
Delete a record.
-
#update(*args) ⇒ Hanami::Entity
Update a record.
Instance Method Details
#create(*args) ⇒ Hanami::Entity
Create a new record
348 349 350 351 352 |
# File 'lib/hanami/repository.rb', line 348 def create(*args) super rescue => exception raise Hanami::Model::Error.for(exception) end |
#delete(*args) ⇒ Hanami::Entity
Delete a record
396 397 398 399 400 |
# File 'lib/hanami/repository.rb', line 396 def delete(*args) super rescue => exception raise Hanami::Model::Error.for(exception) end |
#update(*args) ⇒ Hanami::Entity
Update a record
377 378 379 380 381 |
# File 'lib/hanami/repository.rb', line 377 def update(*args) super rescue => exception raise Hanami::Model::Error.for(exception) end |