Class: Tweetkit::Response::Tweets::Tweet::Annotations::Entity

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/tweetkit/response.rb

Defined Under Namespace

Classes: Annotations, Cashtags, Hashtags, Mentions, Urls

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#annotationsObject

Returns the value of attribute annotations.



235
236
237
# File 'lib/tweetkit/response.rb', line 235

def annotations
  @annotations
end

#cashtagsObject

Returns the value of attribute cashtags.



235
236
237
# File 'lib/tweetkit/response.rb', line 235

def cashtags
  @cashtags
end

#hashtagsObject

Returns the value of attribute hashtags.



235
236
237
# File 'lib/tweetkit/response.rb', line 235

def hashtags
  @hashtags
end

#mentionsObject

Returns the value of attribute mentions.



235
236
237
# File 'lib/tweetkit/response.rb', line 235

def mentions
  @mentions
end

#urlsObject

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