Class: Rgviz::Sort
- Inherits:
-
Object
- Object
- Rgviz::Sort
- Defined in:
- lib/rgviz/nodes.rb
Constant Summary collapse
Instance Attribute Summary collapse
-
#column ⇒ Object
Returns the value of attribute column.
-
#order ⇒ Object
Returns the value of attribute order.
Instance Method Summary collapse
- #accept(visitor) ⇒ Object
-
#initialize(column, order) ⇒ Sort
constructor
A new instance of Sort.
- #to_s ⇒ Object
Constructor Details
#initialize(column, order) ⇒ Sort
Returns a new instance of Sort.
119 120 121 122 |
# File 'lib/rgviz/nodes.rb', line 119 def initialize(column, order) @column = column @order = order end |
Instance Attribute Details
#column ⇒ Object
Returns the value of attribute column.
116 117 118 |
# File 'lib/rgviz/nodes.rb', line 116 def column @column end |
#order ⇒ Object
Returns the value of attribute order.
117 118 119 |
# File 'lib/rgviz/nodes.rb', line 117 def order @order end |
Instance Method Details
#accept(visitor) ⇒ Object
124 125 126 127 128 129 |
# File 'lib/rgviz/nodes.rb', line 124 def accept(visitor) if visitor.visit_sort(self) column.accept visitor end visitor.end_visit_sort self end |
#to_s ⇒ Object
131 132 133 |
# File 'lib/rgviz/nodes.rb', line 131 def to_s "#{column} #{order}" end |