Class: Fugle::Response Private
- Inherits:
-
Object
- Object
- Fugle::Response
- Defined in:
- lib/fugle/response.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
API Response
Instance Attribute Summary collapse
- #body ⇒ Object readonly private
- #info ⇒ Object readonly private
- #version ⇒ Object readonly private
Instance Method Summary collapse
-
#initialize(body, attributes) ⇒ Response
constructor
private
Create a new response.
Constructor Details
#initialize(body, attributes) ⇒ Response
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Create a new response
19 20 21 22 23 |
# File 'lib/fugle/response.rb', line 19 def initialize(body, attributes) @version = attributes.fetch('apiVersion', nil) @info = Information.new(attributes.dig('data', 'info')) @body = body.new(attributes.dig('data', body.data_name)) end |
Instance Attribute Details
#body ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
11 12 13 |
# File 'lib/fugle/response.rb', line 11 def body @body end |
#info ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
11 12 13 |
# File 'lib/fugle/response.rb', line 11 def info @info end |
#version ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
11 12 13 |
# File 'lib/fugle/response.rb', line 11 def version @version end |