Class: Jouba::EventStore::Collection
- Inherits:
-
Object
- Object
- Jouba::EventStore::Collection
- Extended by:
- Forwardable
- Includes:
- Enumerable
- Defined in:
- lib/jouba/store.rb
Instance Attribute Summary collapse
-
#collection ⇒ Object
readonly
Returns the value of attribute collection.
Instance Method Summary collapse
-
#initialize(collection) ⇒ Collection
constructor
A new instance of Collection.
- #since(time) ⇒ Object
Constructor Details
#initialize(collection) ⇒ Collection
Returns a new instance of Collection.
55 56 57 |
# File 'lib/jouba/store.rb', line 55 def initialize(collection) @collection = collection end |
Instance Attribute Details
#collection ⇒ Object (readonly)
Returns the value of attribute collection.
52 53 54 |
# File 'lib/jouba/store.rb', line 52 def collection @collection end |
Instance Method Details
#since(time) ⇒ Object
59 60 61 |
# File 'lib/jouba/store.rb', line 59 def since(time) Collection.new collection.select { |item| item. <= time } end |