Class: Rgviz::Label
- Inherits:
-
Object
- Object
- Rgviz::Label
- Defined in:
- lib/rgviz/nodes.rb
Instance Attribute Summary collapse
-
#column ⇒ Object
Returns the value of attribute column.
-
#label ⇒ Object
Returns the value of attribute label.
Instance Method Summary collapse
- #accept(visitor) ⇒ Object
-
#initialize(column, label) ⇒ Label
constructor
A new instance of Label.
- #to_s ⇒ Object
Constructor Details
#initialize(column, label) ⇒ Label
Returns a new instance of Label.
159 160 161 162 |
# File 'lib/rgviz/nodes.rb', line 159 def initialize(column, label) @column = column @label = label end |
Instance Attribute Details
#column ⇒ Object
Returns the value of attribute column.
156 157 158 |
# File 'lib/rgviz/nodes.rb', line 156 def column @column end |
#label ⇒ Object
Returns the value of attribute label.
157 158 159 |
# File 'lib/rgviz/nodes.rb', line 157 def label @label end |
Instance Method Details
#accept(visitor) ⇒ Object
164 165 166 167 168 169 |
# File 'lib/rgviz/nodes.rb', line 164 def accept(visitor) if visitor.visit_label(self) column.accept visitor end visitor.end_visit_label self end |
#to_s ⇒ Object
171 172 173 |
# File 'lib/rgviz/nodes.rb', line 171 def to_s "#{column} `#{label}`" end |