class Opium::Pointer
Attributes
class_name[RW]
id[RW]
model_name[R]
model_name=[RW]
Public Class Methods
new( attributes = {} )
click to toggle source
# File lib/opium/extensions/pointer.rb, line 3 def initialize( attributes = {} ) self.class_name = attributes[:class_name] || attributes[:model_name] || (attributes[:class] || attributes[:model]).model_name self.class_name = self.class_name.name if self.class_name.respond_to?(:name) self.id = attributes[:id] end
Public Instance Methods
to_parse()
click to toggle source
# File lib/opium/extensions/pointer.rb, line 12 def to_parse { __type: 'Pointer', className: class_name, objectId: id }.with_indifferent_access end