Class: Punchblock::Component::Input::Complete::Success
- Inherits:
-
Event::Complete::Reason
- Object
- Niceogiri::XML::Node
- RayoNode
- Event::Complete::Reason
- Punchblock::Component::Input::Complete::Success
- Defined in:
- lib/punchblock/component/input.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from RayoNode
#call_id, #client, #component_id, #connection, #original_component
Instance Method Summary collapse
-
#confidence ⇒ Float
A measure of the confidence of the result, between 0-1.
-
#inspect_attributes ⇒ Object
:nodoc:.
-
#interpretation ⇒ String
An intelligent interpretation of the meaning of the response.
-
#mode ⇒ Symbol
The mode by which the question was answered.
-
#utterance ⇒ String
The exact response gained.
Methods inherited from Event::Complete::Reason
Methods inherited from RayoNode
class_from_registration, #eql?, import, #inspect, new, register, #source
Instance Method Details
#confidence ⇒ Float
Returns A measure of the confidence of the result, between 0-1.
287 288 289 |
# File 'lib/punchblock/component/input.rb', line 287 def confidence read_attr :confidence, :to_f end |
#inspect_attributes ⇒ Object
:nodoc:
305 306 307 |
# File 'lib/punchblock/component/input.rb', line 305 def inspect_attributes # :nodoc: [:mode, :confidence, :interpretation, :utterance] + super end |
#interpretation ⇒ String
Returns An intelligent interpretation of the meaning of the response.
294 295 296 |
# File 'lib/punchblock/component/input.rb', line 294 def interpretation find_first('//ns:interpretation', :ns => self.registered_ns).text end |
#mode ⇒ Symbol
Returns the mode by which the question was answered. May be :speech or :dtmf.
280 281 282 |
# File 'lib/punchblock/component/input.rb', line 280 def mode read_attr :mode, :to_sym end |
#utterance ⇒ String
Returns The exact response gained.
301 302 303 |
# File 'lib/punchblock/component/input.rb', line 301 def utterance find_first('//ns:utterance', :ns => self.registered_ns).text end |