Class: Arel::Nodes::Function
- Includes:
- Expression
- Defined in:
- lib/arel/nodes/function.rb
Instance Attribute Summary collapse
-
#alias ⇒ Object
Returns the value of attribute alias.
-
#expressions ⇒ Object
Returns the value of attribute expressions.
Instance Method Summary collapse
- #as(aliaz) ⇒ Object
-
#initialize(expr, aliaz = nil) ⇒ Function
constructor
A new instance of Function.
Methods inherited from Node
#and, #each, #not, #or, #to_sql
Constructor Details
#initialize(expr, aliaz = nil) ⇒ Function
Returns a new instance of Function.
7 8 9 10 |
# File 'lib/arel/nodes/function.rb', line 7 def initialize expr, aliaz = nil @expressions = expr @alias = aliaz end |
Instance Attribute Details
#alias ⇒ Object
Returns the value of attribute alias.
5 6 7 |
# File 'lib/arel/nodes/function.rb', line 5 def alias @alias end |
#expressions ⇒ Object
Returns the value of attribute expressions.
5 6 7 |
# File 'lib/arel/nodes/function.rb', line 5 def expressions @expressions end |
Instance Method Details
#as(aliaz) ⇒ Object
12 13 14 15 |
# File 'lib/arel/nodes/function.rb', line 12 def as aliaz self.alias = SqlLiteral.new(aliaz) self end |