Class: HttpHealthCheck::Probe::Result
- Inherits:
-
Object
- Object
- HttpHealthCheck::Probe::Result
- Defined in:
- lib/http_health_check/probe/result.rb
Instance Attribute Summary collapse
-
#meta ⇒ Object
readonly
Returns the value of attribute meta.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(is_ok, meta) ⇒ Result
constructor
A new instance of Result.
- #ok? ⇒ Boolean
Constructor Details
#initialize(is_ok, meta) ⇒ Result
Returns a new instance of Result.
14 15 16 17 18 19 20 21 |
# File 'lib/http_health_check/probe/result.rb', line 14 def initialize(is_ok, ) @meta = Hash() @ok = is_ok rescue StandardError => e e = ::HttpHealthCheck::ConfigurationError.new(e.) e.set_backtrace(e.backtrace) raise e end |
Instance Attribute Details
#meta ⇒ Object (readonly)
Returns the value of attribute meta.
22 23 24 |
# File 'lib/http_health_check/probe/result.rb', line 22 def @meta end |
Class Method Details
.error(meta) ⇒ Object
10 11 12 |
# File 'lib/http_health_check/probe/result.rb', line 10 def self.error() new(false, ) end |
.ok(meta) ⇒ Object
6 7 8 |
# File 'lib/http_health_check/probe/result.rb', line 6 def self.ok() new(true, ) end |
Instance Method Details
#ok? ⇒ Boolean
24 25 26 |
# File 'lib/http_health_check/probe/result.rb', line 24 def ok? @ok end |