Class: Sunspot::Query::FunctionalFunctionQuery
- Inherits:
-
FunctionQuery
- Object
- FunctionQuery
- Sunspot::Query::FunctionalFunctionQuery
- Defined in:
- lib/sunspot/query/function_query.rb
Overview
Function query which represents an actual function invocation. Takes a function name and arguments as parameters. Arguments are in turn FunctionQuery objects.
Instance Method Summary collapse
-
#initialize(function_name, function_args) ⇒ FunctionalFunctionQuery
constructor
A new instance of FunctionalFunctionQuery.
- #to_s ⇒ Object
Constructor Details
#initialize(function_name, function_args) ⇒ FunctionalFunctionQuery
Returns a new instance of FunctionalFunctionQuery.
42 43 44 |
# File 'lib/sunspot/query/function_query.rb', line 42 def initialize(function_name, function_args) @function_name, @function_args = function_name, function_args end |
Instance Method Details
#to_s ⇒ Object
46 47 48 49 |
# File 'lib/sunspot/query/function_query.rb', line 46 def to_s params = @function_args.map { |arg| arg.to_s }.join(",") "#{@function_name}(#{params})" end |