Class: Prolly::Ps::Storage::Base
- Inherits:
-
Object
- Object
- Prolly::Ps::Storage::Base
- Defined in:
- lib/prolly/ps/storage/base.rb
Instance Method Summary collapse
- #add(datum) ⇒ Object
- #count(rvs, options = {}) ⇒ Object
- #import(data) ⇒ Object
-
#initialize ⇒ Base
constructor
A new instance of Base.
- #rand_vars ⇒ Object
- #reset ⇒ Object
- #uniq_vals(name) ⇒ Object
Constructor Details
#initialize ⇒ Base
Returns a new instance of Base.
8 9 |
# File 'lib/prolly/ps/storage/base.rb', line 8 def initialize end |
Instance Method Details
#add(datum) ⇒ Object
21 22 23 |
# File 'lib/prolly/ps/storage/base.rb', line 21 def add(datum) raise StandardError.new("not implemented") end |
#count(rvs, options = {}) ⇒ Object
25 26 27 |
# File 'lib/prolly/ps/storage/base.rb', line 25 def count(rvs, = {}) raise StandardError.new("not implemented") end |
#import(data) ⇒ Object
17 18 19 |
# File 'lib/prolly/ps/storage/base.rb', line 17 def import(data) data.each { |datum| add(datum) } end |
#rand_vars ⇒ Object
29 30 |
# File 'lib/prolly/ps/storage/base.rb', line 29 def rand_vars end |
#reset ⇒ Object
11 12 13 14 15 |
# File 'lib/prolly/ps/storage/base.rb', line 11 def reset @stash ||= {} @stash_stats ||= { hits: 0, misses: 0 } @stash_time ||= {} end |
#uniq_vals(name) ⇒ Object
32 33 |
# File 'lib/prolly/ps/storage/base.rb', line 32 def uniq_vals(name) end |