class Rx::Check::Result
Attributes
error[R]
name[R]
timing[R]
Public Class Methods
from(check_name) { || ... }
click to toggle source
# File lib/rx/check/result.rb, line 4 def self.from(check_name) start_at = Process.clock_gettime(Process::CLOCK_MONOTONIC) err = nil result = false begin result = yield rescue StandardError => ex err = ex end end_at = Process.clock_gettime(Process::CLOCK_MONOTONIC) Result.new(check_name, result, ((end_at - start_at) * 1000).round(2), err) end
new(name, ok, timing, error)
click to toggle source
# File lib/rx/check/result.rb, line 22 def initialize(name, ok, timing, error) @name = name @ok = ok @timing = timing @error = error end
Public Instance Methods
ok?()
click to toggle source
# File lib/rx/check/result.rb, line 29 def ok? @ok end