Class: OFlow::Graffle::LineInfo

Inherits:
Element
  • Object
show all
Defined in:
lib/oflow/graffle.rb

Overview

Element

Instance Attribute Summary collapse

Attributes inherited from Element

#id

Instance Method Summary collapse

Constructor Details

#initialize(nodes) ⇒ LineInfo

Returns a new instance of LineInfo.



203
204
205
206
207
# File 'lib/oflow/graffle.rb', line 203

def initialize(nodes)
  super
  @tail = Graffle.get_key_value(Graffle.get_key_value(nodes, 'Tail'), 'ID')
  @head = Graffle.get_key_value(Graffle.get_key_value(nodes, 'Head'), 'ID')
end

Instance Attribute Details

#headObject

Returns the value of attribute head.



199
200
201
# File 'lib/oflow/graffle.rb', line 199

def head
  @head
end

#labelObject

Returns the value of attribute label.



200
201
202
# File 'lib/oflow/graffle.rb', line 200

def label
  @label
end

#opObject

Returns the value of attribute op.



201
202
203
# File 'lib/oflow/graffle.rb', line 201

def op
  @op
end

#tailObject

Returns the value of attribute tail.



198
199
200
# File 'lib/oflow/graffle.rb', line 198

def tail
  @tail
end

Instance Method Details

#to_sObject



209
210
211
# File 'lib/oflow/graffle.rb', line 209

def to_s()
  "LineInfo{id:#{@id}, tail:#{@tail}, head:#{@head}, label: #{label}:#{op}}"
end