Sha256: 6972025cacdabdb88a037491c67ac0deeb3da83ebac2275c467806d92f0a6ae1
Contents?: true
Size: 532 Bytes
Versions: 1
Compression:
Stored size: 532 Bytes
Contents
module Subjoin # A resource identifier object # @see http://jsonapi.org/format/#document-resource-identifier-objects class Identifier include Metable attr_reader :type attr_reader :id def initialize(type, id, meta=nil) #load_key(data) @type = type @id = id @meta = load_meta(meta) end # Test for equality. Two Ideintifers are considered equal if they # have the same type and id def ==(other) return @type == other.type && @id == other.id end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
subjoin-0.2.1 | lib/subjoin/identifier.rb |