Module: HumanError::Errors::CrudError
- Included in:
- AssociationError, ResourceNotFoundError, ResourcePersistenceError
- Defined in:
- lib/human_error/errors/crud_error.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
Returns the value of attribute action.
-
#resource_id ⇒ Object
Returns the value of attribute resource_id.
-
#resource_name ⇒ Object
Returns the value of attribute resource_name.
Instance Method Summary collapse
Instance Attribute Details
#action ⇒ Object
Returns the value of attribute action.
4 5 6 |
# File 'lib/human_error/errors/crud_error.rb', line 4 def action @action end |
#resource_id ⇒ Object
Returns the value of attribute resource_id.
4 5 6 |
# File 'lib/human_error/errors/crud_error.rb', line 4 def resource_id @resource_id end |
#resource_name ⇒ Object
Returns the value of attribute resource_name.
4 5 6 |
# File 'lib/human_error/errors/crud_error.rb', line 4 def resource_name @resource_name end |
Instance Method Details
#initialize(resource_name: nil, action: nil, resource_id: nil, **args) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/human_error/errors/crud_error.rb', line 8 def initialize(resource_name: nil, action: nil, resource_id: nil, **args) self.resource_name = resource_name self.action = action || 'persist' self.resource_id = resource_id super(**args) end |