Class: ObjectGraph::Pointer

Inherits:
Object
  • Object
show all
Defined in:
lib/ograph.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, object_id, options = {}) ⇒ Pointer

Returns a new instance of Pointer.



416
417
418
419
420
# File 'lib/ograph.rb', line 416

def initialize(name, object_id, options = {})
  @name       = name
  @object_id  = object_id
  @options    = options
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



415
416
417
# File 'lib/ograph.rb', line 415

def name
  @name
end

#object_idObject

Returns the value of attribute object_id.



415
416
417
# File 'lib/ograph.rb', line 415

def object_id
  @object_id
end

#optionsObject

Returns the value of attribute options.



415
416
417
# File 'lib/ograph.rb', line 415

def options
  @options
end

Instance Method Details

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


426
427
428
# File 'lib/ograph.rb', line 426

def eql?(other)
  name.eql? other.name
end

#hashObject



422
423
424
# File 'lib/ograph.rb', line 422

def hash
  name.hash
end