Class: CouchProxy::Reducer

Inherits:
Object
  • Object
show all
Defined in:
lib/couchproxy/reducer.rb

Instance Method Summary collapse

Constructor Details

#initialize(couchjs) ⇒ Reducer

Returns a new instance of Reducer.



5
6
7
# File 'lib/couchproxy/reducer.rb', line 5

def initialize(couchjs)
  @couchjs, @conn = "#{couchjs} #{mainjs(couchjs)}", nil
end

Instance Method Details

#rereduce(fn, values, &callback) ⇒ Object



9
10
11
12
# File 'lib/couchproxy/reducer.rb', line 9

def rereduce(fn, values, &callback)
  connect unless @conn
  @conn.rereduce(fn, values, callback)
end