Class: WingedCouch::Queries::ViewResultProcessor

Inherits:
Object
  • Object
show all
Defined in:
lib/winged_couch/queries/view_result_processor.rb

Defined Under Namespace

Modules: MapReduceProcesor, MapViewProcessor

Constant Summary collapse

MAPPING =
{
  "view:map" => MapViewProcessor,
  "view:map:reduce" => MapReduceProcesor
}

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(view, model, raw_result) ⇒ ViewResultProcessor


26
27
28
29
30
# File 'lib/winged_couch/queries/view_result_processor.rb', line 26

def initialize(view, model, raw_result)
  @view = view
  @model = model
  @raw_result = raw_result
end

Instance Attribute Details

#modelObject (readonly)

Returns the value of attribute model


24
25
26
# File 'lib/winged_couch/queries/view_result_processor.rb', line 24

def model
  @model
end

#raw_resultObject (readonly)

Returns the value of attribute raw_result


24
25
26
# File 'lib/winged_couch/queries/view_result_processor.rb', line 24

def raw_result
  @raw_result
end

#viewObject (readonly)

Returns the value of attribute view


24
25
26
# File 'lib/winged_couch/queries/view_result_processor.rb', line 24

def view
  @view
end

Instance Method Details

#resultObject


32
33
34
# File 'lib/winged_couch/queries/view_result_processor.rb', line 32

def result
  internal_processor.process(raw_result, model)
end