Class: CouchRest::Model::SearchResults

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/couchrest_model_cloudant.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(total_rows, bookmark, objects) ⇒ SearchResults

Returns a new instance of SearchResults.



29
30
31
32
33
# File 'lib/couchrest_model_cloudant.rb', line 29

def initialize(total_rows, bookmark, objects)
  @total_rows = total_rows
  @bookmark = bookmark
  @objects = objects
end

Instance Attribute Details

#bookmarkObject

Returns the value of attribute bookmark.



27
28
29
# File 'lib/couchrest_model_cloudant.rb', line 27

def bookmark
  @bookmark
end

#total_rowsObject

Returns the value of attribute total_rows.



27
28
29
# File 'lib/couchrest_model_cloudant.rb', line 27

def total_rows
  @total_rows
end

Instance Method Details

#eachObject



35
36
37
38
39
# File 'lib/couchrest_model_cloudant.rb', line 35

def each
  @objects.each do |member|
    yield member
  end
end