Class: HOALife::Property

Inherits:
Resource show all
Includes:
Resources::Persistable
Defined in:
lib/hoalife/property.rb

Overview

:nodoc

Constant Summary

Constants included from Arrayable

Arrayable::BLANK_RE

Instance Attribute Summary

Attributes inherited from Resource

#attrs

Instance Method Summary collapse

Methods inherited from Resource

#==, #initialize, #method_missing, new, resource_collection, #respond_to?, #to_json

Methods included from Arrayable

#as_array

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_jsonObject



12
13
14
15
16
17
18
19
20
# File 'lib/hoalife/property.rb', line 12

def as_json
  h = super

  h.dig('data', 'relationships').merge!(
    'account' => { 'data' => { 'id' =>  } }
  )

  h
end