Class: TransactionEventStore::Client::Page
- Inherits:
-
Object
- Object
- TransactionEventStore::Client::Page
- Defined in:
- lib/transaction_event_store/client.rb
Instance Attribute Summary collapse
-
#count ⇒ Object
readonly
Returns the value of attribute count.
-
#start ⇒ Object
readonly
Returns the value of attribute start.
Instance Method Summary collapse
-
#initialize(repository, start, count) ⇒ Page
constructor
Allow count to be nil to disable limit.
Constructor Details
#initialize(repository, start, count) ⇒ Page
Allow count to be nil to disable limit
47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/transaction_event_store/client.rb', line 47 def initialize(repository, start, count) if start.instance_of?(Symbol) raise InvalidPageStart unless [:head].include?(start) else start = start.to_s raise InvalidPageStart if start.empty? raise EventNotFound unless repository.has_event?(start) end @start = start @count = count end |
Instance Attribute Details
#count ⇒ Object (readonly)
Returns the value of attribute count.
58 59 60 |
# File 'lib/transaction_event_store/client.rb', line 58 def count @count end |
#start ⇒ Object (readonly)
Returns the value of attribute start.
58 59 60 |
# File 'lib/transaction_event_store/client.rb', line 58 def start @start end |