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