Class: Rgviz::OrderBy
- Inherits:
-
Object
- Object
- Rgviz::OrderBy
- Defined in:
- lib/rgviz/nodes.rb
Instance Attribute Summary collapse
-
#sorts ⇒ Object
Returns the value of attribute sorts.
Instance Method Summary collapse
- #accept(visitor) ⇒ Object
-
#initialize ⇒ OrderBy
constructor
A new instance of OrderBy.
- #to_s ⇒ Object
Constructor Details
#initialize ⇒ OrderBy
Returns a new instance of OrderBy.
92 93 94 |
# File 'lib/rgviz/nodes.rb', line 92 def initialize @sorts = [] end |
Instance Attribute Details
#sorts ⇒ Object
Returns the value of attribute sorts.
90 91 92 |
# File 'lib/rgviz/nodes.rb', line 90 def sorts @sorts end |
Instance Method Details
#accept(visitor) ⇒ Object
96 97 98 99 100 101 |
# File 'lib/rgviz/nodes.rb', line 96 def accept(visitor) if visitor.visit_order_by(self) sorts.each{|x| x.accept visitor} end visitor.end_visit_order_by self end |
#to_s ⇒ Object
103 104 105 |
# File 'lib/rgviz/nodes.rb', line 103 def to_s @sorts.map(&:to_s).join(', ') end |