Class: Rgviz::Where

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(expression) ⇒ Where

Returns a new instance of Where.



139
140
141
# File 'lib/rgviz/nodes.rb', line 139

def initialize(expression)
  @expression = expression
end

Instance Attribute Details

#expressionObject

Returns the value of attribute expression.



137
138
139
# File 'lib/rgviz/nodes.rb', line 137

def expression
  @expression
end

Instance Method Details

#accept(visitor) ⇒ Object



143
144
145
146
147
148
# File 'lib/rgviz/nodes.rb', line 143

def accept(visitor)
  if visitor.visit_where(self)
    expression.accept visitor
  end
  visitor.end_visit_where self
end

#to_sObject



150
151
152
# File 'lib/rgviz/nodes.rb', line 150

def to_s
  @expression.to_s
end