class Subjoin::Identifier

A resource identifier object @see jsonapi.org/format/#document-resource-identifier-objects

Attributes

id[R]
type[R]

Public Class Methods

new(type, id, meta=nil) click to toggle source
# File lib/subjoin/identifier.rb, line 10
def initialize(type, id, meta=nil)
  #load_key(data)
  @type = type
  @id = id
  @meta = load_meta(meta)
end

Public Instance Methods

==(other) click to toggle source

Test for equality. Two Ideintifers are considered equal if they have the same type and id

# File lib/subjoin/identifier.rb, line 19
def ==(other)
  return @type == other.type && @id == other.id
end