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