Class: BiliHttp::ResponseBody
- Inherits:
-
Object
- Object
- BiliHttp::ResponseBody
- Defined in:
- lib/bilibili_console/http/response_body.rb
Overview
response body
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#data ⇒ Object
Returns the value of attribute data.
-
#message ⇒ Object
Returns the value of attribute message.
-
#status ⇒ Object
Returns the value of attribute status.
-
#ts ⇒ Object
Returns the value of attribute ts.
Instance Method Summary collapse
-
#initialize(json) ⇒ ResponseBody
constructor
A new instance of ResponseBody.
- #to_s ⇒ Object
Constructor Details
#initialize(json) ⇒ ResponseBody
Returns a new instance of ResponseBody.
16 17 18 19 20 21 22 |
# File 'lib/bilibili_console/http/response_body.rb', line 16 def initialize(json) @code = json[:code] @message = json[:message] @ts = json[:ts] @status = json[:status] @data = json[:data] end |
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
14 15 16 |
# File 'lib/bilibili_console/http/response_body.rb', line 14 def code @code end |
#data ⇒ Object
Returns the value of attribute data.
14 15 16 |
# File 'lib/bilibili_console/http/response_body.rb', line 14 def data @data end |
#message ⇒ Object
Returns the value of attribute message.
14 15 16 |
# File 'lib/bilibili_console/http/response_body.rb', line 14 def @message end |
#status ⇒ Object
Returns the value of attribute status.
14 15 16 |
# File 'lib/bilibili_console/http/response_body.rb', line 14 def status @status end |
#ts ⇒ Object
Returns the value of attribute ts.
14 15 16 |
# File 'lib/bilibili_console/http/response_body.rb', line 14 def ts @ts end |
Instance Method Details
#to_s ⇒ Object
24 25 26 |
# File 'lib/bilibili_console/http/response_body.rb', line 24 def to_s "code: #{@code}, message: #{@message}, ts: #{@ts}, data: #{@data}, status: #{@status}" end |