Class: Punchblock::Component::Input::Complete::Success

Inherits:
Event::Complete::Reason show all
Defined in:
lib/punchblock/component/input.rb

Direct Known Subclasses

Tropo::Ask::Complete::Success

Instance Attribute Summary

Attributes inherited from RayoNode

#call_id, #client, #component_id, #connection, #original_component

Instance Method Summary collapse

Methods inherited from Event::Complete::Reason

#name

Methods inherited from RayoNode

class_from_registration, #eql?, import, #inspect, new, register, #source

Instance Method Details

#confidenceFloat

Returns A measure of the confidence of the result, between 0-1.

Returns:

  • (Float)

    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_attributesObject

:nodoc:



305
306
307
# File 'lib/punchblock/component/input.rb', line 305

def inspect_attributes # :nodoc:
  [:mode, :confidence, :interpretation, :utterance] + super
end

#interpretationString

Returns An intelligent interpretation of the meaning of the response.

Returns:

  • (String)

    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

#modeSymbol

Returns the mode by which the question was answered. May be :speech or :dtmf.

Returns:

  • (Symbol)

    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

#utteranceString

Returns The exact response gained.

Returns:

  • (String)

    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