Class: SayDigits
Instance Method Summary
collapse
#command, #command_error?, #message, #result, #return_code, #to_s
Constructor Details
#initialize(command, response) ⇒ SayDigits
Returns a new instance of SayDigits.
41
42
43
|
# File 'lib/ruby-agi/rs/say_digits.rb', line 41
def initialize(command, response)
super(command, response)
end
|
Instance Method Details
#digit ⇒ Object
69
70
71
72
73
74
75
|
# File 'lib/ruby-agi/rs/say_digits.rb', line 69
def digit
if @digit.nil?
@digit = result.to_i.chr
end
return @digit
end
|
#error? ⇒ Boolean
77
78
79
|
# File 'lib/ruby-agi/rs/say_digits.rb', line 77
def error?
return command_error?
end
|
#failure? ⇒ Boolean
57
58
59
60
61
62
63
64
65
66
67
|
# File 'lib/ruby-agi/rs/say_digits.rb', line 57
def failure?
if @is_failure.nil?
if result == '-1'
@is_failure = true
else
@is_failure = false
end
end
return @is_failure
end
|
#response ⇒ Object
81
82
83
|
# File 'lib/ruby-agi/rs/say_digits.rb', line 81
def response
return message
end
|
#success? ⇒ Boolean
45
46
47
48
49
50
51
52
53
54
55
|
# File 'lib/ruby-agi/rs/say_digits.rb', line 45
def success?
if @is_success.nil?
if result == '0'
@is_success = true
else
@is_success = false
end
end
return @is_success
end
|