Class: Rgviz::IdColumn

Inherits:
Object
  • Object
show all
Defined in:
lib/rgviz/nodes.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#nameObject

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: ==

Returns:

  • (Boolean)


318
319
320
# File 'lib/rgviz/nodes.rb', line 318

def eql?(other)
  other.class == IdColumn && other.name == @name
end

#hashObject



314
315
316
# File 'lib/rgviz/nodes.rb', line 314

def hash
  @name.hash
end

#to_sObject



324
325
326
# File 'lib/rgviz/nodes.rb', line 324

def to_s
  @name
end