Class: Seaquel::AST::Alias
- Inherits:
-
Object
- Object
- Seaquel::AST::Alias
- Defined in:
- lib/seaquel/ast/alias.rb
Instance Attribute Summary collapse
-
#expression ⇒ Object
readonly
Returns the value of attribute expression.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, expression) ⇒ Alias
constructor
A new instance of Alias.
- #inspect ⇒ Object
- #visit(visitor) ⇒ Object
Constructor Details
#initialize(name, expression) ⇒ Alias
Returns a new instance of Alias.
6 7 8 9 |
# File 'lib/seaquel/ast/alias.rb', line 6 def initialize name, expression @name = name @expression = expression end |
Instance Attribute Details
#expression ⇒ Object (readonly)
Returns the value of attribute expression.
4 5 6 |
# File 'lib/seaquel/ast/alias.rb', line 4 def expression @expression end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/seaquel/ast/alias.rb', line 4 def name @name end |
Instance Method Details
#inspect ⇒ Object
15 16 17 |
# File 'lib/seaquel/ast/alias.rb', line 15 def inspect "(alias #{name.inspect} #{expression.inspect})" end |
#visit(visitor) ⇒ Object
11 12 13 |
# File 'lib/seaquel/ast/alias.rb', line 11 def visit visitor visitor.visit_alias(name, expression) end |