class Ralyxa::ResponseEntities::Reprompt
Public Class Methods
as_hash(reprompt_speech: nil, reprompt_ssml: false)
click to toggle source
# File lib/ralyxa/response_entities/reprompt.rb, line 15 def self.as_hash(reprompt_speech: nil, reprompt_ssml: false) new(reprompt_speech, reprompt_ssml).to_h end
new(reprompt_speech, reprompt_ssml)
click to toggle source
# File lib/ralyxa/response_entities/reprompt.rb, line 4 def initialize(reprompt_speech, reprompt_ssml) @reprompt_speech = reprompt_speech @reprompt_ssml = reprompt_ssml end
Public Instance Methods
to_h()
click to toggle source
# File lib/ralyxa/response_entities/reprompt.rb, line 9 def to_h {}.tap do |reprompt| reprompt[:outputSpeech] = Ralyxa::ResponseEntities::OutputSpeech.as_hash(speech: @reprompt_speech, ssml: @reprompt_ssml) end end