class Relaxo::QueryServer::Process

A simple high level functional process attached to a given ‘context`. Typically used for executing functions from map/reduce and design documents.

Public Class Methods

new(context, function) click to toggle source
# File lib/relaxo/query_server/process.rb, line 25
def initialize(context, function)
        @context = context
        @function = function
end

Public Instance Methods

call(*args) click to toggle source
# File lib/relaxo/query_server/process.rb, line 34
def call(*args)
        instance_exec *args, &@function
end
log(message) click to toggle source
# File lib/relaxo/query_server/process.rb, line 30
def log(message)
        @context.log message
end
run(*args) click to toggle source
# File lib/relaxo/query_server/process.rb, line 38
def run(*args)
        call(*args)
end