Class: ReceiveText
Instance Method Summary
collapse
#command, #command_error?, #message, #result, #return_code, #to_s
Constructor Details
#initialize(command, response) ⇒ ReceiveText
Returns a new instance of ReceiveText.
41
42
43
|
# File 'lib/ruby-agi/rs/receive_text.rb', line 41
def initialize(command, response)
super(command, response)
end
|
Instance Method Details
#error? ⇒ Boolean
65
66
67
|
# File 'lib/ruby-agi/rs/receive_text.rb', line 65
def error?
return command_error?
end
|
#failure? ⇒ Boolean
49
50
51
52
53
54
55
56
57
58
59
|
# File 'lib/ruby-agi/rs/receive_text.rb', line 49
def failure?
if @is_failure.nil?
if result == '-1'
@is_failure = true
else
@is_failure = false
end
end
return @is_failure
end
|
#response ⇒ Object
69
70
71
|
# File 'lib/ruby-agi/rs/receive_text.rb', line 69
def response
return message
end
|
#success? ⇒ Boolean
45
46
47
|
# File 'lib/ruby-agi/rs/receive_text.rb', line 45
def success?
return (not failure?)
end
|
#text ⇒ Object
61
62
63
|
# File 'lib/ruby-agi/rs/receive_text.rb', line 61
def text
return result
end
|