class Bandwidth::Transcript
Transcript
Model.
Attributes
confidence[RW]
TODO: Write general description for this method @return [Float]
text[RW]
TODO: Write general description for this method @return [String]
Public Class Methods
from_hash(hash)
click to toggle source
Creates an instance of the object from a hash.
# File lib/bandwidth/voice_lib/voice/models/transcript.rb, line 32 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. text = hash['text'] confidence = hash['confidence'] # Create object from extracted values. Transcript.new(text, confidence) end
names()
click to toggle source
A mapping from model property names to API property names.
# File lib/bandwidth/voice_lib/voice/models/transcript.rb, line 18 def self.names @_hash = {} if @_hash.nil? @_hash['text'] = 'text' @_hash['confidence'] = 'confidence' @_hash end
new(text = nil, confidence = nil)
click to toggle source
# File lib/bandwidth/voice_lib/voice/models/transcript.rb, line 25 def initialize(text = nil, confidence = nil) @text = text @confidence = confidence end