Class: Dsl::Graph::Edge

Inherits:
Object
  • Object
show all
Defined in:
lib/dsl/graph/edge.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id, from, to, label = "") ⇒ Edge

Returns a new instance of Edge.



11
12
13
14
15
16
# File 'lib/dsl/graph/edge.rb', line 11

def initialize(id, from, to, label="")
  @id = id
  @from = from
  @to = to
  @label = label
end

Instance Attribute Details

#fromObject

Returns the value of attribute from.



7
8
9
# File 'lib/dsl/graph/edge.rb', line 7

def from
  @from
end

#idObject (readonly)

Returns the value of attribute id.



6
7
8
# File 'lib/dsl/graph/edge.rb', line 6

def id
  @id
end

#labelObject

Returns the value of attribute label.



9
10
11
# File 'lib/dsl/graph/edge.rb', line 9

def label
  @label
end

#toObject

Returns the value of attribute to.



8
9
10
# File 'lib/dsl/graph/edge.rb', line 8

def to
  @to
end

Instance Method Details

#to_sObject



18
19
20
# File 'lib/dsl/graph/edge.rb', line 18

def to_s
  @label
end