Method: Unit::UnitResource#initialize

Defined in:
lib/unit/models/unit_resource.rb

#initialize(id, type, attributes, relationships) ⇒ UnitResource

Returns a new instance of UnitResource.

Parameters:

  • id (String)

    The resource’s ID

  • type (String)

    The type of the resource

  • attributes (Hash)

    The attributes

  • relationships (Hash)

    The relationships



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