Class: LinkedIn::Response
- Inherits:
-
Object
- Object
- LinkedIn::Response
- Defined in:
- lib/linked_in/response.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#code ⇒ Object
Returns the value of attribute code.
Instance Method Summary collapse
- #[](attribute) ⇒ Object
-
#initialize(response) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(response) ⇒ Response
Returns a new instance of Response.
5 6 7 8 |
# File 'lib/linked_in/response.rb', line 5 def initialize(response) @code = response.code @body = response.body.from_json end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
3 4 5 |
# File 'lib/linked_in/response.rb', line 3 def body @body end |
#code ⇒ Object
Returns the value of attribute code.
3 4 5 |
# File 'lib/linked_in/response.rb', line 3 def code @code end |
Instance Method Details
#[](attribute) ⇒ Object
10 11 12 |
# File 'lib/linked_in/response.rb', line 10 def [](attribute) body[attribute] end |