Class: RubyEventStore::Outbox::FetchSpecification
- Inherits:
-
Object
- Object
- RubyEventStore::Outbox::FetchSpecification
- Defined in:
- lib/ruby_event_store/outbox/fetch_specification.rb
Instance Attribute Summary collapse
-
#message_format ⇒ Object
readonly
Returns the value of attribute message_format.
-
#split_key ⇒ Object
readonly
Returns the value of attribute split_key.
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
- #hash ⇒ Object
-
#initialize(message_format, split_key) ⇒ FetchSpecification
constructor
A new instance of FetchSpecification.
Constructor Details
#initialize(message_format, split_key) ⇒ FetchSpecification
Returns a new instance of FetchSpecification.
6 7 8 9 10 |
# File 'lib/ruby_event_store/outbox/fetch_specification.rb', line 6 def initialize(, split_key) @message_format = @split_key = split_key freeze end |
Instance Attribute Details
#message_format ⇒ Object (readonly)
Returns the value of attribute message_format.
12 13 14 |
# File 'lib/ruby_event_store/outbox/fetch_specification.rb', line 12 def @message_format end |
#split_key ⇒ Object (readonly)
Returns the value of attribute split_key.
12 13 14 |
# File 'lib/ruby_event_store/outbox/fetch_specification.rb', line 12 def split_key @split_key end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
14 15 16 |
# File 'lib/ruby_event_store/outbox/fetch_specification.rb', line 14 def ==(other) other.instance_of?(self.class) && other..eql?() && other.split_key.eql?(split_key) end |
#hash ⇒ Object
18 19 20 |
# File 'lib/ruby_event_store/outbox/fetch_specification.rb', line 18 def hash [, split_key].hash ^ self.class.hash end |