class RubyEventStore::Stream
Attributes
name[R]
Public Class Methods
new(name)
click to toggle source
# File lib/ruby_event_store/stream.rb, line 5 def initialize(name) raise IncorrectStreamData if !name.equal?(GLOBAL_STREAM) && (name.nil? || name.empty?) @name = name end
Public Instance Methods
==(other_stream)
click to toggle source
# File lib/ruby_event_store/stream.rb, line 20 def ==(other_stream) other_stream.instance_of?(self.class) && other_stream.name.eql?(name) end
Also aliased as: eql?
global?()
click to toggle source
# File lib/ruby_event_store/stream.rb, line 10 def global? name.equal?(GLOBAL_STREAM) end
hash()
click to toggle source
# File lib/ruby_event_store/stream.rb, line 16 def hash name.hash ^ self.class.hash end