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.
101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/ruby_event_store/client.rb', line 101 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.
113 114 115 |
# File 'lib/ruby_event_store/client.rb', line 113 def count @count end |
#start ⇒ Object (readonly)
Returns the value of attribute start.
113 114 115 |
# File 'lib/ruby_event_store/client.rb', line 113 def start @start end |