Class: Dsl::Graph::Edge
- Inherits:
-
Object
- Object
- Dsl::Graph::Edge
- Defined in:
- lib/dsl/graph/edge.rb
Instance Attribute Summary collapse
-
#from ⇒ Object
Returns the value of attribute from.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#label ⇒ Object
Returns the value of attribute label.
-
#to ⇒ Object
Returns the value of attribute to.
Instance Method Summary collapse
-
#initialize(id, from, to, label = "") ⇒ Edge
constructor
A new instance of Edge.
- #to_s ⇒ Object
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
#from ⇒ Object
Returns the value of attribute from.
7 8 9 |
# File 'lib/dsl/graph/edge.rb', line 7 def from @from end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
6 7 8 |
# File 'lib/dsl/graph/edge.rb', line 6 def id @id end |
#label ⇒ Object
Returns the value of attribute label.
9 10 11 |
# File 'lib/dsl/graph/edge.rb', line 9 def label @label end |
#to ⇒ Object
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_s ⇒ Object
18 19 20 |
# File 'lib/dsl/graph/edge.rb', line 18 def to_s @label end |