Class: Tweetkit::Response::Tweets::Tweet::Annotations::Context

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

Defined Under Namespace

Classes: Annotation

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(annotations) ⇒ Context

Returns a new instance of Context.



212
213
214
215
216
# File 'lib/tweetkit/response.rb', line 212

def initialize(annotations)
  return unless annotations

  @annotations = annotations.collect { |annotation| Annotation.new(annotation) }
end

Instance Attribute Details

#annotationsObject

Returns the value of attribute annotations.



210
211
212
# File 'lib/tweetkit/response.rb', line 210

def annotations
  @annotations
end

Instance Method Details

#each(*args, &block) ⇒ Object



218
219
220
# File 'lib/tweetkit/response.rb', line 218

def each(*args, &block)
  annotations.each(*args, &block)
end