Class: Punchblock::Component::Prompt
- Inherits:
-
ComponentNode
- Object
- RayoNode
- Punchblock::CommandNode
- ComponentNode
- Punchblock::Component::Prompt
- Defined in:
- lib/punchblock/component/prompt.rb
Instance Attribute Summary
Attributes inherited from RayoNode
#client, #connection, #original_component
Instance Method Summary collapse
- #inherit(xml_node) ⇒ Object
-
#initialize(output = nil, input = nil, options = {}) ⇒ Component::Prompt
constructor
Create a prompt command.
- #rayo_attributes ⇒ Object
- #rayo_children(root) ⇒ Object
Methods inherited from ComponentNode
#add_event, #complete_event, #complete_event=, #register_event_handler, #register_internal_handlers, #response=, #stop!, #stop_action, #trigger_event_handler, #write_action
Methods inherited from Punchblock::CommandNode
Methods inherited from RayoNode
#==, class_from_registration, from_xml, #inspect, register, #source, #to_rayo, #to_xml
Constructor Details
#initialize(output = nil, input = nil, options = {}) ⇒ Component::Prompt
Create a prompt command
22 23 24 25 26 |
# File 'lib/punchblock/component/prompt.rb', line 22 def initialize(output = nil, input = nil, = {}) super self.output = output self.input = input end |
Instance Method Details
#inherit(xml_node) ⇒ Object
28 29 30 31 32 33 34 35 36 |
# 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 ⇒ Object
38 39 40 41 42 |
# File 'lib/punchblock/component/prompt.rb', line 38 def rayo_attributes { 'barge-in' => } end |