Class: RPlatform::Rails::StatusManager

Inherits:
Object
  • Object
show all
Defined in:
lib/rplatform_rails/status_manager.rb

Instance Method Summary collapse

Constructor Details

#initialize(checks) ⇒ StatusManager

Returns a new instance of StatusManager.



37
38
39
# File 'lib/rplatform_rails/status_manager.rb', line 37

def initialize(checks)
  @checks = checks
end

Instance Method Details

#all_valid?Boolean

Returns:

  • (Boolean)


41
42
43
44
45
46
47
# File 'lib/rplatform_rails/status_manager.rb', line 41

def all_valid?
  allValid = true
  @checks.each do |check|
    allValid = false if !check.valid?
  end
  return allValid
end

#each_status_checkObject



49
50
51
52
53
# File 'lib/rplatform_rails/status_manager.rb', line 49

def each_status_check
  @checks.each do |check|
    yield(check)
  end
end