class Punchblock::Component::Prompt
Public Class Methods
new(output = nil, input = nil, options = {})
click to toggle source
Create a prompt command
@param [Output] output @param [Input] input @param [Hash] options @option options [true, false, optional] :barge_in Indicates wether or not the input should interrupt then output
@return [Component::Prompt] a formatted Rayo prompt command
Calls superclass method
Punchblock::Component::ComponentNode::new
# File lib/punchblock/component/prompt.rb, line 22 def initialize(output = nil, input = nil, options = {}) super options self.output = output self.input = input end
Public Instance Methods
inherit(xml_node)
click to toggle source
Calls superclass method
# File lib/punchblock/component/prompt.rb, line 28 def inherit(xml_node) input_node = xml_node.at_xpath('ns:input', ns: Input.registered_ns) self.input = Input.from_xml input_node if input_node output_node = xml_node.at_xpath('ns:output', ns: Output.registered_ns) self.output = Output.from_xml output_node if output_node super end
rayo_attributes()
click to toggle source
# File lib/punchblock/component/prompt.rb, line 38 def rayo_attributes { 'barge-in' => barge_in } end
rayo_children(root)
click to toggle source
Calls superclass method
# File lib/punchblock/component/prompt.rb, line 44 def rayo_children(root) input.to_rayo(root) if input output.to_rayo(root) if output super end