Class: HOALife::Violation
- Includes:
- Resources::HasNestedObject, Resources::Persistable
- Defined in:
- lib/hoalife/violation.rb
Overview
:nodoc
Constant Summary
Constants included from Arrayable
Instance Attribute Summary
Attributes inherited from Resource
Instance Method Summary collapse
Methods inherited from Resource
#==, #initialize, #method_missing, new, resource_collection, #respond_to?, #to_json
Methods included from Arrayable
Constructor Details
This class inherits a constructor from HOALife::Resource
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class HOALife::Resource
Instance Method Details
#as_json ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/hoalife/violation.rb', line 13 def as_json h = super h.dig('data', 'relationships').merge!( 'property' => { 'data' => { 'id' => property_id } }, 'ccr_violation_type' => { 'data' => { 'id' => ccr_violation_type_id } }, 'inspector' => { 'data' => { 'email' => inspector_email } } ) h end |