Class: SayNumber
Instance Method Summary
collapse
#command, #command_error?, #message, #result, #return_code, #to_s
Constructor Details
#initialize(command, response) ⇒ SayNumber
Returns a new instance of SayNumber.
44
45
46
|
# File 'lib/ruby-agi/rs/say_number.rb', line 44
def initialize(command, response)
super(command, response)
end
|
Instance Method Details
#digit ⇒ Object
72
73
74
75
76
77
78
|
# File 'lib/ruby-agi/rs/say_number.rb', line 72
def digit
if @digit.nil?
@digit = result.to_i.chr
end
return @digit
end
|
#error? ⇒ Boolean
80
81
82
|
# File 'lib/ruby-agi/rs/say_number.rb', line 80
def error?
return command_error?
end
|
#failure? ⇒ Boolean
60
61
62
63
64
65
66
67
68
69
70
|
# File 'lib/ruby-agi/rs/say_number.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
|
#response ⇒ Object
84
85
86
|
# File 'lib/ruby-agi/rs/say_number.rb', line 84
def response
return message
end
|
#success? ⇒ Boolean
48
49
50
51
52
53
54
55
56
57
58
|
# File 'lib/ruby-agi/rs/say_number.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
|