Class: Cgraph::Entity

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

Constant Summary collapse

@@count =
0
@@names =
[]

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Entity

Returns a new instance of Entity.



8
9
10
11
12
13
14
# File 'lib/cgraph.rb', line 8

def initialize name
  @name = Entity.check_name name
  @id = Entity.get_id
  @picture = ""
  @group = ""
  @outgoing = []
end

Instance Attribute Details

#groupObject

Returns the value of attribute group.



6
7
8
# File 'lib/cgraph.rb', line 6

def group
  @group
end

#idObject (readonly)

Returns the value of attribute id.



7
8
9
# File 'lib/cgraph.rb', line 7

def id
  @id
end

#labelObject

Returns the value of attribute label.



6
7
8
# File 'lib/cgraph.rb', line 6

def label
  @label
end

#nameObject (readonly)

Returns the value of attribute name.



7
8
9
# File 'lib/cgraph.rb', line 7

def name
  @name
end

#outgoingObject

Returns the value of attribute outgoing.



6
7
8
# File 'lib/cgraph.rb', line 6

def outgoing
  @outgoing
end

#pictureObject

Returns the value of attribute picture.



6
7
8
# File 'lib/cgraph.rb', line 6

def picture
  @picture
end

Class Method Details

.clear_namelistObject



15
16
17
# File 'lib/cgraph.rb', line 15

def self.clear_namelist
  @@names = []
end