ruby_event_store/lib/ruby_event_store/specification.rb
# Limits the query to events before or after another event.
# {http://railseventstore.org/docs/read/ Find out more}.
#
# @param start [:head, String] id of event to start reading from.
#   :head can mean the beginning or end of the stream, depending on the
#   #direction
# @return [Specification]
Limits the query to events before or after another event.
Limits the query to events before or after another event .
def from(start)
      case start
      when Symbol
        raise InvalidPageStart unless [:head].include?(start)
      else
        raise InvalidPageStart if start.nil? || start.empty?
        raise EventNotFound.new(start) unless reader.has_event?(start)
      end
      Specification.new(reader, result.dup { |r| r.start = start })
    end
def from ( start ) case start when Symbol raise InvalidPageStart unless [ :head ] . include? ( start ) else raise InvalidPageStart if start . nil? || start . empty? raise EventNotFound . new ( start ) unless reader . has_event? ( start ) end Specification . new ( reader , result . dup { | r | r . start = start } ) end
Limits the query to events before or after another event.
Limits the query to events before or after another event .
None
Specification
start
id of event to start reading from. :head can mean the beginning or end of the stream, depending on the #direction
id of event to start reading from . : head can mean the beginning or end of the stream depending on the #direction