Class: Health::Checks::Rollout
- Inherits:
-
Object
- Object
- Health::Checks::Rollout
- Defined in:
- lib/health/checks/rollout.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(rollout_name, rollout = $rollout) ⇒ Rollout
constructor
A new instance of Rollout.
- #name ⇒ Object
Constructor Details
#initialize(rollout_name, rollout = $rollout) ⇒ Rollout
Returns a new instance of Rollout.
4 5 6 7 |
# File 'lib/health/checks/rollout.rb', line 4 def initialize(rollout_name, rollout = $rollout) @rollout_name = rollout_name @rollout = rollout end |
Instance Method Details
#call ⇒ Object
13 14 15 16 |
# File 'lib/health/checks/rollout.rb', line 13 def call {:ok => @rollout.active?(@rollout_name), :output => @rollout.get(@rollout_name).to_hash} end |
#name ⇒ Object
9 10 11 |
# File 'lib/health/checks/rollout.rb', line 9 def name "#{@rollout_name}_rollout" end |