Class: Health::Checks::Rollout

Inherits:
Object
  • Object
show all
Defined in:
lib/health/checks/rollout.rb

Instance Method Summary collapse

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

#callObject



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

#nameObject



9
10
11
# File 'lib/health/checks/rollout.rb', line 9

def name
  "#{@rollout_name}_rollout"
end