Class: Healthchecker::Check

Inherits:
Object
  • Object
show all
Defined in:
lib/healthchecker/check.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Check

Returns a new instance of Check.



5
6
7
# File 'lib/healthchecker/check.rb', line 5

def initialize(options = {})
  @options = options
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



3
4
5
# File 'lib/healthchecker/check.rb', line 3

def options
  @options
end

Instance Method Details

#check!Object

Raises:

  • (NotImplementedError)


9
# File 'lib/healthchecker/check.rb', line 9

def check!; raise NotImplementedError; end

#perform_checkObject



11
12
13
14
15
# File 'lib/healthchecker/check.rb', line 11

def perform_check
  check!
rescue RuntimeError => e
  [e.class, e.message, options]
end