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.
94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/ruby_event_store/client.rb', line 94 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 raise InvalidPageSize unless count > 0 @start = start @count = count end |
Instance Attribute Details
#count ⇒ Object (readonly)
Returns the value of attribute count.
106 107 108 |
# File 'lib/ruby_event_store/client.rb', line 106 def count @count end |
#start ⇒ Object (readonly)
Returns the value of attribute start.
106 107 108 |
# File 'lib/ruby_event_store/client.rb', line 106 def start @start end |