Class: Synapse::ProcessManager::Correlation
- Inherits:
-
Object
- Object
- Synapse::ProcessManager::Correlation
- Defined in:
- lib/synapse/process_manager/correlation.rb
Overview
Combination key and value that is used to correlate incoming events with process instances
Instance Attribute Summary collapse
- #key ⇒ Symbol readonly
- #value ⇒ String readonly
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
- #hash ⇒ Object
- #initialize(key, value) ⇒ undefined constructor
Constructor Details
#initialize(key, value) ⇒ undefined
14 15 16 17 |
# File 'lib/synapse/process_manager/correlation.rb', line 14 def initialize(key, value) @key = key.to_sym @value = value.to_s end |
Instance Attribute Details
#key ⇒ Symbol (readonly)
6 7 8 |
# File 'lib/synapse/process_manager/correlation.rb', line 6 def key @key end |
#value ⇒ String (readonly)
9 10 11 |
# File 'lib/synapse/process_manager/correlation.rb', line 9 def value @value end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
19 20 21 22 23 |
# File 'lib/synapse/process_manager/correlation.rb', line 19 def ==(other) self.class === other and other.key == @key and other.value == @value end |
#hash ⇒ Object
27 28 29 |
# File 'lib/synapse/process_manager/correlation.rb', line 27 def hash @key.hash ^ @value.hash end |