Class: LinkedIn::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/linked_in/response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#bodyObject

Returns the value of attribute body.



3
4
5
# File 'lib/linked_in/response.rb', line 3

def body
  @body
end

#codeObject

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