Class: GOM::Storage::CouchDB::Collection::Fetcher
- Inherits:
-
Object
- Object
- GOM::Storage::CouchDB::Collection::Fetcher
- Defined in:
- lib/gom/storage/couchdb/collection/fetcher.rb
Overview
Fetches a result-set of a CouchDB view and provides it to a GOM collection.
Instance Method Summary collapse
- #drafts ⇒ Object
-
#initialize(view, revisions, options) ⇒ Fetcher
constructor
A new instance of Fetcher.
- #rows ⇒ Object
Constructor Details
#initialize(view, revisions, options) ⇒ Fetcher
Returns a new instance of Fetcher.
5 6 7 |
# File 'lib/gom/storage/couchdb/collection/fetcher.rb', line 5 def initialize(view, revisions, ) @view, @revisions, @options = view, revisions, end |
Instance Method Details
#drafts ⇒ Object
9 10 11 12 13 14 |
# File 'lib/gom/storage/couchdb/collection/fetcher.rb', line 9 def drafts return nil if @view.reduce fetch_collection fetch_drafts @drafts end |
#rows ⇒ Object
16 17 18 19 |
# File 'lib/gom/storage/couchdb/collection/fetcher.rb', line 16 def rows fetch_collection @collection end |