Class: Rubigraph::Edge
- Inherits:
-
Object
- Object
- Rubigraph::Edge
- Defined in:
- lib/rubigraph.rb
Overview
Edge between Vertexes
Instance Method Summary collapse
- #arrow=(a) ⇒ Object
- #color=(c) ⇒ Object
- #colour=(c) ⇒ Object
- #fontcolor=(c) ⇒ Object
- #fontfamily=(f) ⇒ Object
- #fontsize=(s) ⇒ Object
-
#initialize(from, to, id = Rubigraph.genid) ⇒ Edge
constructor
create an Edge.
- #label=(l) ⇒ Object
- #labelpos=(p) ⇒ Object
- #orientationweight=(o) ⇒ Object
- #remove ⇒ Object
- #set_attribute(att, value) ⇒ Object
- #set_attributes(attrs) ⇒ Object
- #showstrain=(s) ⇒ Object
- #strength=(s) ⇒ Object
- #width=(w) ⇒ Object
Constructor Details
Instance Method Details
#arrow=(a) ⇒ Object
143 144 145 |
# File 'lib/rubigraph.rb', line 143 def arrow=(a) set_attribute('arrow', a) end |
#color=(c) ⇒ Object
101 102 103 |
# File 'lib/rubigraph.rb', line 101 def color=(c) set_attribute('color', c) end |
#colour=(c) ⇒ Object
105 106 107 |
# File 'lib/rubigraph.rb', line 105 def colour=(c) self.color=(c) end |
#fontcolor=(c) ⇒ Object
117 118 119 |
# File 'lib/rubigraph.rb', line 117 def fontcolor=(c) set_attribute('fontcolor', c) end |
#fontfamily=(f) ⇒ Object
121 122 123 124 |
# File 'lib/rubigraph.rb', line 121 def fontfamily=(f) # TODO: should assert 'Helvetica' | 'Times Roman' set_attribute('fontfamily', f) end |
#fontsize=(s) ⇒ Object
126 127 128 129 |
# File 'lib/rubigraph.rb', line 126 def fontsize=(s) # TODO: should assert 10, 12, 18. 24 set_attribute('fontsize', s) end |
#label=(l) ⇒ Object
109 110 111 |
# File 'lib/rubigraph.rb', line 109 def label=(l) set_attribute('label', l) end |
#labelpos=(p) ⇒ Object
113 114 115 |
# File 'lib/rubigraph.rb', line 113 def labelpos=(p) set_attribute('labelpos', p) end |
#orientationweight=(o) ⇒ Object
135 136 137 |
# File 'lib/rubigraph.rb', line 135 def orientationweight=(o) set_attribute('orientationweight', o) end |
#remove ⇒ Object
87 88 89 |
# File 'lib/rubigraph.rb', line 87 def remove Rubigraph.call('ubigraph.remove_edge', @id) end |
#set_attribute(att, value) ⇒ Object
91 92 93 |
# File 'lib/rubigraph.rb', line 91 def set_attribute(att, value) Rubigraph.call('ubigraph.set_edge_attribute', @id, att, value.to_s) end |
#set_attributes(attrs) ⇒ Object
95 96 97 98 99 |
# File 'lib/rubigraph.rb', line 95 def set_attributes(attrs) attrs.each do |k, v| Rubigraph.call('ubigraph.set_edge_attribute', @id, k, v.to_s) end end |
#showstrain=(s) ⇒ Object
147 148 149 |
# File 'lib/rubigraph.rb', line 147 def showstrain=(s) set_attribute('showstrain', s) end |
#strength=(s) ⇒ Object
131 132 133 |
# File 'lib/rubigraph.rb', line 131 def strength=(s) set_attribute('strength', s) end |
#width=(w) ⇒ Object
139 140 141 |
# File 'lib/rubigraph.rb', line 139 def width=(w) set_attribute('width', w) end |