Class: Unit::UnitResource
- Inherits:
-
Object
- Object
- Unit::UnitResource
- Defined in:
- lib/unit/models/unit_resource.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#relationships ⇒ Object
readonly
Returns the value of attribute relationships.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(id, type, attributes, relationships) ⇒ UnitResource
constructor
A new instance of UnitResource.
Constructor Details
#initialize(id, type, attributes, relationships) ⇒ UnitResource
Returns a new instance of UnitResource.
13 14 15 16 17 18 |
# File 'lib/unit/models/unit_resource.rb', line 13 def initialize(id, type, attributes, relationships) @id = id @type = type @attributes = attributes @relationships = relationships end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
7 8 9 |
# File 'lib/unit/models/unit_resource.rb', line 7 def attributes @attributes end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
7 8 9 |
# File 'lib/unit/models/unit_resource.rb', line 7 def id @id end |
#relationships ⇒ Object (readonly)
Returns the value of attribute relationships.
7 8 9 |
# File 'lib/unit/models/unit_resource.rb', line 7 def relationships @relationships end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
7 8 9 |
# File 'lib/unit/models/unit_resource.rb', line 7 def type @type end |