Class: VoiceML::HealthFailure

Inherits:
Object
  • Object
show all
Defined in:
lib/voiceml/models/common.rb

Overview

One tripped check from the ‘/health` deep probe.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(check:, detail:) ⇒ HealthFailure

Returns a new instance of HealthFailure.



53
54
55
56
# File 'lib/voiceml/models/common.rb', line 53

def initialize(check:, detail:)
  @check  = check
  @detail = detail
end

Instance Attribute Details

#checkObject (readonly)

Returns the value of attribute check.



51
52
53
# File 'lib/voiceml/models/common.rb', line 51

def check
  @check
end

#detailObject (readonly)

Returns the value of attribute detail.



51
52
53
# File 'lib/voiceml/models/common.rb', line 51

def detail
  @detail
end

Class Method Details

.from_hash(hash) ⇒ Object



58
59
60
61
62
# File 'lib/voiceml/models/common.rb', line 58

def self.from_hash(hash)
  return nil if hash.nil?

  new(check: hash['check'], detail: hash['detail'])
end