Class: Checkson::Check::Certificate
- Defined in:
- lib/checkson/checks/certificate.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #check ⇒ Object
-
#initialize(opts = {}) ⇒ Certificate
constructor
A new instance of Certificate.
Methods inherited from Base
Constructor Details
#initialize(opts = {}) ⇒ Certificate
Returns a new instance of Certificate.
6 7 8 9 10 |
# File 'lib/checkson/checks/certificate.rb', line 6 def initialize(opts = {}) @opts = (@opts || {}).merge(opts) @opts[:port] ||= 443 super() end |
Instance Method Details
#check ⇒ Object
12 13 14 15 16 |
# File 'lib/checkson/checks/certificate.rb', line 12 def check raise ArgumentError, 'No options given' unless @opts[:domain] && @opts[:port] || @opts[:certfile] || @opts[:leftdays] @opts[:domain] ? http_check : file_check end |