Class: RubyEventStore::Client::Page
- Inherits:
-
Object
- Object
- RubyEventStore::Client::Page
- Defined in:
- lib/ruby_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
A new instance of Page.
Constructor Details
#initialize(repository, start, count) ⇒ Page
Returns a new instance of Page.
120 121 122 123 124 125 126 127 128 129 130 131 |
# File 'lib/ruby_event_store/client.rb', line 120 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.new(start) unless repository.has_event?(start) end raise InvalidPageSize unless count > 0 @start = start @count = count end |
Instance Attribute Details
#count ⇒ Object (readonly)
Returns the value of attribute count.
132 133 134 |
# File 'lib/ruby_event_store/client.rb', line 132 def count @count end |
#start ⇒ Object (readonly)
Returns the value of attribute start.
132 133 134 |
# File 'lib/ruby_event_store/client.rb', line 132 def start @start end |