Class: SayPhonetic

Inherits:
ReturnStatus show all
Defined in:
lib/ruby-agi/rs/say_phonetic.rb

Instance Method Summary collapse

Methods inherited from ReturnStatus

#command, #command_error?, #message, #result, #return_code, #to_s

Constructor Details

#initialize(command, response) ⇒ SayPhonetic

Returns a new instance of SayPhonetic.



44
45
46
# File 'lib/ruby-agi/rs/say_phonetic.rb', line 44

def initialize(command, response)
	super(command, response)
end

Instance Method Details

#digitObject



72
73
74
75
76
77
78
# File 'lib/ruby-agi/rs/say_phonetic.rb', line 72

def digit
	if @digit.nil?
		@digit = result.to_i.chr
	end

	return @digit
end

#error?Boolean

Returns:

  • (Boolean)


80
81
82
# File 'lib/ruby-agi/rs/say_phonetic.rb', line 80

def error?
	return command_error?
end

#failure?Boolean

Returns:

  • (Boolean)


60
61
62
63
64
65
66
67
68
69
70
# File 'lib/ruby-agi/rs/say_phonetic.rb', line 60

def failure?
	if @is_failure.nil?
		if result == '-1'
			@is_failure = true
		else
			@is_failure = false
		end 
	end

	return @is_failure
end

#responseObject



84
85
86
# File 'lib/ruby-agi/rs/say_phonetic.rb', line 84

def response
	return message
end

#success?Boolean

Returns:

  • (Boolean)


48
49
50
51
52
53
54
55
56
57
58
# File 'lib/ruby-agi/rs/say_phonetic.rb', line 48

def success?
	if @is_success.nil?
		if result == '0'
			@is_success = true
		else
			@is_success = false
		end 
	end

	return @is_success
end