Class: Tweetkit::Response::Tweets::Tweet::Annotations::Entity
- Inherits:
-
Object
- Object
- Tweetkit::Response::Tweets::Tweet::Annotations::Entity
- Includes:
- Enumerable
- Defined in:
- lib/tweetkit/response.rb
Defined Under Namespace
Classes: Annotations, Cashtags, Hashtags, Mentions, Urls
Instance Attribute Summary collapse
-
#annotations ⇒ Object
Returns the value of attribute annotations.
-
#cashtags ⇒ Object
Returns the value of attribute cashtags.
-
#hashtags ⇒ Object
Returns the value of attribute hashtags.
-
#mentions ⇒ Object
Returns the value of attribute mentions.
-
#urls ⇒ Object
Returns the value of attribute urls.
Instance Method Summary collapse
- #each(*args, &block) ⇒ Object
-
#initialize(entity_annotations) ⇒ Entity
constructor
A new instance of Entity.
Constructor Details
#initialize(entity_annotations) ⇒ Entity
Returns a new instance of Entity.
237 238 239 240 241 242 243 244 245 |
# File 'lib/tweetkit/response.rb', line 237 def initialize(entity_annotations) return unless entity_annotations @annotations = Annotations.new(entity_annotations['annotations']) @cashtags = Cashtags.new(entity_annotations['cashtags']) @hashtags = Hashtags.new(entity_annotations['hashtags']) @mentions = Mentions.new(entity_annotations['mentions']) @urls = Urls.new(entity_annotations['urls']) end |
Instance Attribute Details
#annotations ⇒ Object
Returns the value of attribute annotations.
235 236 237 |
# File 'lib/tweetkit/response.rb', line 235 def annotations @annotations end |
#cashtags ⇒ Object
Returns the value of attribute cashtags.
235 236 237 |
# File 'lib/tweetkit/response.rb', line 235 def @cashtags end |
#hashtags ⇒ Object
Returns the value of attribute hashtags.
235 236 237 |
# File 'lib/tweetkit/response.rb', line 235 def @hashtags end |
#mentions ⇒ Object
Returns the value of attribute mentions.
235 236 237 |
# File 'lib/tweetkit/response.rb', line 235 def mentions @mentions end |
#urls ⇒ Object
Returns the value of attribute urls.
235 236 237 |
# File 'lib/tweetkit/response.rb', line 235 def urls @urls end |
Instance Method Details
#each(*args, &block) ⇒ Object
247 248 249 |
# File 'lib/tweetkit/response.rb', line 247 def each(*args, &block) annotations.each(*args, &block) end |