Class: GOM::Storage::Counter
- Inherits:
-
Object
- Object
- GOM::Storage::Counter
- Defined in:
- lib/gom/storage/counter.rb
Overview
Counts the number of objects in the given storage.
Instance Method Summary collapse
-
#initialize(storage_name) ⇒ Counter
constructor
A new instance of Counter.
- #perform ⇒ Object
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
#perform ⇒ Object
9 10 11 |
# File 'lib/gom/storage/counter.rb', line 9 def perform adapter.count end |