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
Methods inherited from FunctionQuery
Constructor Details
#initialize(function_name, function_args) ⇒ FunctionalFunctionQuery
Returns a new instance of FunctionalFunctionQuery.
47 48 49 |
# File 'lib/sunspot/query/function_query.rb', line 47 def initialize(function_name, function_args) @function_name, @function_args = function_name, function_args end |
Instance Method Details
#to_s ⇒ Object
51 52 53 54 |
# File 'lib/sunspot/query/function_query.rb', line 51 def to_s params = @function_args.map { |arg| arg.to_s }.join(",") "#{@function_name}(#{params})" << (@boost_amount ? "^#{@boost_amount}" : "") end |