Class: Orbacle::GlobalTree::Klass

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id, parent_ref, eigenclass_id = nil) ⇒ Klass

Returns a new instance of Klass.



38
39
40
41
42
# File 'lib/orbacle/global_tree.rb', line 38

def initialize(id, parent_ref, eigenclass_id = nil)
  @id = id
  @parent_ref = parent_ref
  @eigenclass_id = eigenclass_id
end

Instance Attribute Details

#eigenclass_idObject

Returns the value of attribute eigenclass_id.



44
45
46
# File 'lib/orbacle/global_tree.rb', line 44

def eigenclass_id
  @eigenclass_id
end

#idObject (readonly)

Returns the value of attribute id.



44
45
46
# File 'lib/orbacle/global_tree.rb', line 44

def id
  @id
end

#parent_refObject (readonly)

Returns the value of attribute parent_ref.



44
45
46
# File 'lib/orbacle/global_tree.rb', line 44

def parent_ref
  @parent_ref
end

Instance Method Details

#==(other) ⇒ Object



47
48
49
50
51
# File 'lib/orbacle/global_tree.rb', line 47

def ==(other)
  @id == other.id &&
    @parent_ref == other.parent_ref &&
    @eigenclass_id == other.eigenclass_id
end