Class: GOM::Storage::Counter

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

Overview

Counts the number of objects in the given storage.

Instance Method Summary collapse

Constructor Details

#initialize(storage_name) ⇒ Counter

Returns a new instance of Counter.



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

def initialize(storage_name)
  @storage_name = storage_name
end

Instance Method Details

#performObject



9
10
11
# File 'lib/gom/storage/counter.rb', line 9

def perform
  adapter.count
end