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