Class: Rgviz::IdColumn
- Inherits:
-
Object
- Object
- Rgviz::IdColumn
- Defined in:
- lib/rgviz/nodes.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
- #accept(visitor) ⇒ Object
- #eql?(other) ⇒ Boolean (also: #==)
- #hash ⇒ Object
-
#initialize(name) ⇒ IdColumn
constructor
A new instance of IdColumn.
- #to_s ⇒ Object
Constructor Details
#initialize(name) ⇒ IdColumn
Returns a new instance of IdColumn.
305 306 307 |
# File 'lib/rgviz/nodes.rb', line 305 def initialize(name) @name = name end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
303 304 305 |
# File 'lib/rgviz/nodes.rb', line 303 def name @name end |
Instance Method Details
#accept(visitor) ⇒ Object
309 310 311 312 |
# File 'lib/rgviz/nodes.rb', line 309 def accept(visitor) visitor.visit_id_column(self) visitor.end_visit_id_column self end |
#eql?(other) ⇒ Boolean Also known as: ==
318 319 320 |
# File 'lib/rgviz/nodes.rb', line 318 def eql?(other) other.class == IdColumn && other.name == @name end |
#hash ⇒ Object
314 315 316 |
# File 'lib/rgviz/nodes.rb', line 314 def hash @name.hash end |
#to_s ⇒ Object
324 325 326 |
# File 'lib/rgviz/nodes.rb', line 324 def to_s @name end |