Class: Xtb::Http::Command::Response
- Inherits:
-
Struct
- Object
- Struct
- Xtb::Http::Command::Response
- Defined in:
- lib/xtb/http/command.rb
Instance Attribute Summary collapse
-
#command ⇒ Object
Returns the value of attribute command.
-
#raw_response ⇒ Object
Returns the value of attribute raw_response.
Instance Method Summary collapse
- #error_code ⇒ Object
- #error_description ⇒ Object
-
#initialize(**args) ⇒ Response
constructor
A new instance of Response.
- #return_data ⇒ Object
- #status ⇒ Object (also: #success?)
- #stream_session_id ⇒ Object
Constructor Details
#initialize(**args) ⇒ Response
Returns a new instance of Response.
33 34 35 36 37 |
# File 'lib/xtb/http/command.rb', line 33 def initialize(**args) super @response = parse end |
Instance Attribute Details
#command ⇒ Object
Returns the value of attribute command
32 33 34 |
# File 'lib/xtb/http/command.rb', line 32 def command @command end |
#raw_response ⇒ Object
Returns the value of attribute raw_response
32 33 34 |
# File 'lib/xtb/http/command.rb', line 32 def raw_response @raw_response end |
Instance Method Details
#error_code ⇒ Object
53 54 55 |
# File 'lib/xtb/http/command.rb', line 53 def error_code response[:error_code] end |
#error_description ⇒ Object
57 58 59 |
# File 'lib/xtb/http/command.rb', line 57 def error_description response[:error_descr] end |
#return_data ⇒ Object
45 46 47 |
# File 'lib/xtb/http/command.rb', line 45 def return_data response[:return_data] end |
#status ⇒ Object Also known as: success?
39 40 41 |
# File 'lib/xtb/http/command.rb', line 39 def status response[:status] end |
#stream_session_id ⇒ Object
49 50 51 |
# File 'lib/xtb/http/command.rb', line 49 def stream_session_id response[:stream_session_id] end |