Class: KakaxiParse::Datatype::Pointer

Inherits:
Base
  • Object
show all
Defined in:
lib/kakaxi_parse/datatypes/pointer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(klass, id) ⇒ Pointer

Returns a new instance of Pointer.



6
7
8
9
# File 'lib/kakaxi_parse/datatypes/pointer.rb', line 6

def initialize(klass, id)
  @id = id
  @klass = klass
end

Instance Attribute Details

#idObject

Returns the value of attribute id.



4
5
6
# File 'lib/kakaxi_parse/datatypes/pointer.rb', line 4

def id
  @id
end

Instance Method Details

#to_hashObject



11
12
13
# File 'lib/kakaxi_parse/datatypes/pointer.rb', line 11

def to_hash
  { __type: 'Pointer', className: @klass.demodulize, objectId: @id }
end