Class: GOM::Storage::CouchDB::Counter

Inherits:
Object
  • Object
show all
Defined in:
lib/gom/storage/couchdb/counter.rb

Overview

Fetches the databases document count.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(database) ⇒ Counter

Returns a new instance of Counter.



7
8
9
# File 'lib/gom/storage/couchdb/counter.rb', line 7

def initialize(database)
  @database = database
end

Instance Attribute Details

#databaseObject

Returns the value of attribute database.



5
6
7
# File 'lib/gom/storage/couchdb/counter.rb', line 5

def database
  @database
end

Instance Method Details

#performObject



11
12
13
14
15
# File 'lib/gom/storage/couchdb/counter.rb', line 11

def perform
  fetch_information
  fetch_count
  @count
end