Class: DashOverlord::Serializers::V1::Base

Inherits:
Base
  • Object
show all
Defined in:
lib/dash_overlord/serializers/v1/base.rb

Constant Summary

Constants inherited from Base

Base::RAILS_HTTP_STATUS

Instance Attribute Summary

Attributes inherited from Base

#object, #options

Instance Method Summary collapse

Methods inherited from Base

attributes, expose, #initialize, root, root_name, serialize, #serialize, to_hash

Constructor Details

This class inherits a constructor from DashOverlord::Serializers::Base

Instance Method Details

#errorsObject



10
11
12
# File 'lib/dash_overlord/serializers/v1/base.rb', line 10

def errors
  object.errors.to_hash
end

#has_errorsObject



6
7
8
# File 'lib/dash_overlord/serializers/v1/base.rb', line 6

def has_errors
  !object.errors.empty?
end