Class: RDStation::ErrorHandler::ConflictingField
- Inherits:
-
Object
- Object
- RDStation::ErrorHandler::ConflictingField
- Defined in:
- lib/rdstation/error_handler/conflicting_field.rb
Constant Summary collapse
- ERROR_CODE =
'CONFLICTING_FIELD'.freeze
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Instance Method Summary collapse
-
#initialize(errors) ⇒ ConflictingField
constructor
A new instance of ConflictingField.
- #raise_error ⇒ Object
Constructor Details
#initialize(errors) ⇒ ConflictingField
Returns a new instance of ConflictingField.
8 9 10 |
# File 'lib/rdstation/error_handler/conflicting_field.rb', line 8 def initialize(errors) @errors = errors end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
4 5 6 |
# File 'lib/rdstation/error_handler/conflicting_field.rb', line 4 def errors @errors end |
Instance Method Details
#raise_error ⇒ Object
12 13 14 15 |
# File 'lib/rdstation/error_handler/conflicting_field.rb', line 12 def raise_error return if conflicting_field_errors.empty? raise RDStation::Error::ConflictingField, conflicting_field_errors.first end |