Class: CMUX::ModemCommandResponse
- Inherits:
-
Object
- Object
- CMUX::ModemCommandResponse
- Defined in:
- lib/cmux/modem_command_response.rb
Instance Attribute Summary collapse
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
- #failure? ⇒ Boolean
-
#initialize(error, body) ⇒ ModemCommandResponse
constructor
A new instance of ModemCommandResponse.
- #success? ⇒ Boolean
Constructor Details
#initialize(error, body) ⇒ ModemCommandResponse
Returns a new instance of ModemCommandResponse.
5 6 7 8 |
# File 'lib/cmux/modem_command_response.rb', line 5 def initialize(error, body) @error = error @response = body end |
Instance Attribute Details
#error ⇒ Object (readonly)
Returns the value of attribute error.
3 4 5 |
# File 'lib/cmux/modem_command_response.rb', line 3 def error @error end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
3 4 5 |
# File 'lib/cmux/modem_command_response.rb', line 3 def response @response end |
Instance Method Details
#failure? ⇒ Boolean
14 15 16 |
# File 'lib/cmux/modem_command_response.rb', line 14 def failure? !success? end |
#success? ⇒ Boolean
10 11 12 |
# File 'lib/cmux/modem_command_response.rb', line 10 def success? @error.nil? end |