Class: ValidationErrorSerializer
- Inherits:
-
Object
- Object
- ValidationErrorSerializer
- Defined in:
- lib/serializers/validation_error_serializer.rb
Instance Method Summary collapse
-
#initialize(record, field, details, message) ⇒ ValidationErrorSerializer
constructor
A new instance of ValidationErrorSerializer.
- #serialize ⇒ Object
Constructor Details
#initialize(record, field, details, message) ⇒ ValidationErrorSerializer
Returns a new instance of ValidationErrorSerializer.
4 5 6 7 8 9 |
# File 'lib/serializers/validation_error_serializer.rb', line 4 def initialize(record, field, details, ) @record = record @field = field @details = details @message = end |
Instance Method Details
#serialize ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/serializers/validation_error_serializer.rb', line 11 def serialize { resource: resource, field: field, code: code, message: } end |