Class: Tweetkit::Response
- Inherits:
-
Object
- Object
- Tweetkit::Response
- Defined in:
- lib/tweetkit/response.rb
Defined Under Namespace
Classes: Meta, Resources, Tweet, Tweets
Instance Attribute Summary collapse
-
#meta ⇒ Object
Returns the value of attribute meta.
-
#original_response ⇒ Object
Returns the value of attribute original_response.
-
#resources ⇒ Object
Returns the value of attribute resources.
-
#tweets ⇒ Object
Returns the value of attribute tweets.
Instance Method Summary collapse
-
#initialize(response) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(response) ⇒ Response
Returns a new instance of Response.
7 8 9 10 11 12 13 |
# File 'lib/tweetkit/response.rb', line 7 def initialize(response) @original_response = response.body parsed_response = JSON.parse(@original_response) @tweets = Tweetkit::Response::Tweets.new(parsed_response) @meta = Tweetkit::Response::Meta.new(@tweets.) @resources = Tweetkit::Response::Resources.new(@tweets.resources) end |
Instance Attribute Details
#meta ⇒ Object
Returns the value of attribute meta.
5 6 7 |
# File 'lib/tweetkit/response.rb', line 5 def @meta end |
#original_response ⇒ Object
Returns the value of attribute original_response.
5 6 7 |
# File 'lib/tweetkit/response.rb', line 5 def original_response @original_response end |
#resources ⇒ Object
Returns the value of attribute resources.
5 6 7 |
# File 'lib/tweetkit/response.rb', line 5 def resources @resources end |
#tweets ⇒ Object
Returns the value of attribute tweets.
5 6 7 |
# File 'lib/tweetkit/response.rb', line 5 def tweets @tweets end |