Class: Solidarity::Graph::Edge

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Edge

Returns a new instance of Edge.



60
61
62
63
64
65
# File 'lib/solidarity/graph.rb', line 60

def initialize(data)
  @source = data[:source]
  @target = data[:target]
  @label = data[:label]
  @type = data[:type]
end

Instance Attribute Details

#labelObject (readonly)

Returns the value of attribute label.



58
59
60
# File 'lib/solidarity/graph.rb', line 58

def label
  @label
end

#sourceObject (readonly)

Returns the value of attribute source.



58
59
60
# File 'lib/solidarity/graph.rb', line 58

def source
  @source
end

#targetObject (readonly)

Returns the value of attribute target.



58
59
60
# File 'lib/solidarity/graph.rb', line 58

def target
  @target
end

#typeObject (readonly)

Returns the value of attribute type.



58
59
60
# File 'lib/solidarity/graph.rb', line 58

def type
  @type
end