Class: Flounder::Expression::FunCall

Inherits:
Expr
  • Object
show all
Defined in:
lib/flounder/expression.rb

Instance Method Summary collapse

Methods inherited from Expr

#&, #as, #cast, #db_quote, #eval, #to_immediate, #|

Constructor Details

#initialize(domain, name, arguments) ⇒ FunCall

Returns a new instance of FunCall.



79
80
81
82
83
84
# File 'lib/flounder/expression.rb', line 79

def initialize domain, name, arguments
  super(domain)

  @name = name
  @arguments = arguments
end

Instance Method Details

#to_sqlObject



86
87
88
89
# File 'lib/flounder/expression.rb', line 86

def to_sql
  @name.to_s << '(' << 
    @arguments.map { |arg| eval(arg) }.join(', ') << ')'          
end