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

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

Constant Summary

Constants inherited from RayoNode

RayoNode::InvalidNodeError

Instance Attribute Summary

Attributes inherited from RayoNode

#client, #component_id, #connection, #domain, #original_component, #target_call_id, #target_mixer_name

Instance Method Summary collapse

Methods inherited from Event::Complete::Reason

#name, new

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



283
284
285
# File 'lib/punchblock/component/input.rb', line 283

def confidence
  read_attr :confidence, :to_f
end

#confidence=(other) ⇒ Object



287
288
289
# File 'lib/punchblock/component/input.rb', line 287

def confidence=(other)
  write_attr :confidence, other
end

#inspect_attributesObject

:nodoc:



313
314
315
# File 'lib/punchblock/component/input.rb', line 313

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
  interpretation_node.text
end

#interpretation=(other) ⇒ Object



298
299
300
# File 'lib/punchblock/component/input.rb', line 298

def interpretation=(other)
  interpretation_node.content = other
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



272
273
274
# File 'lib/punchblock/component/input.rb', line 272

def mode
  read_attr :mode, :to_sym
end

#mode=(other) ⇒ Object



276
277
278
# File 'lib/punchblock/component/input.rb', line 276

def mode=(other)
  write_attr :mode, other
end

#utteranceString

Returns The exact response gained.

Returns:

  • (String)

    The exact response gained



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

def utterance
  utterance_node.text
end

#utterance=(other) ⇒ Object



309
310
311
# File 'lib/punchblock/component/input.rb', line 309

def utterance=(other)
  utterance_node.content = other
end