class TransactionEventStore::Client::Page

Attributes

count[R]
start[R]

Public Class Methods

new(repository, start, count) click to toggle source

Allow count to be nil to disable limit

# 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