Class: Bosh::Monitor::Plugins::ResurrectorHelper::JobInstanceKey
- Inherits:
-
Object
- Object
- Bosh::Monitor::Plugins::ResurrectorHelper::JobInstanceKey
- Defined in:
- lib/bosh/monitor/plugins/resurrector_helper.rb
Overview
Hashable tuple of the identifying properties of a job
Instance Attribute Summary collapse
-
#deployment ⇒ Object
Returns the value of attribute deployment.
-
#id ⇒ Object
Returns the value of attribute id.
-
#job ⇒ Object
Returns the value of attribute job.
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean
- #hash ⇒ Object
-
#initialize(deployment, job, id) ⇒ JobInstanceKey
constructor
A new instance of JobInstanceKey.
- #to_s ⇒ Object
Constructor Details
#initialize(deployment, job, id) ⇒ JobInstanceKey
Returns a new instance of JobInstanceKey.
8 9 10 11 12 |
# File 'lib/bosh/monitor/plugins/resurrector_helper.rb', line 8 def initialize(deployment, job, id) @deployment = deployment @job = job @id = id end |
Instance Attribute Details
#deployment ⇒ Object
Returns the value of attribute deployment.
6 7 8 |
# File 'lib/bosh/monitor/plugins/resurrector_helper.rb', line 6 def deployment @deployment end |
#id ⇒ Object
Returns the value of attribute id.
6 7 8 |
# File 'lib/bosh/monitor/plugins/resurrector_helper.rb', line 6 def id @id end |
#job ⇒ Object
Returns the value of attribute job.
6 7 8 |
# File 'lib/bosh/monitor/plugins/resurrector_helper.rb', line 6 def job @job end |
Instance Method Details
#eql?(other) ⇒ Boolean
18 19 20 21 22 |
# File 'lib/bosh/monitor/plugins/resurrector_helper.rb', line 18 def eql?(other) other.deployment == deployment && other.job == job && other.id == id end |
#hash ⇒ Object
14 15 16 |
# File 'lib/bosh/monitor/plugins/resurrector_helper.rb', line 14 def hash (deployment.to_s + job.to_s + id.to_s).hash end |
#to_s ⇒ Object
24 25 26 |
# File 'lib/bosh/monitor/plugins/resurrector_helper.rb', line 24 def to_s [deployment, job, id].join('/') end |