Included Modules


Represents a sorted, dated and typed list of trends.

To find out when this Trendline was created query the as_of attribute. To find out what type Trendline is use the type attribute. You can iterator over the trends in the Trendline with each or by index, whichever you prefer.


Public Class Methods

attributes() click to toggle source
     # File lib/twitter/model.rb, line 228
228:       def attributes; @@ATTRIBUTES; end

Public Instance Methods

<=>(other) click to toggle source

Spaceship operator definition needed by Comparable mixin for sort, etc.

     # File lib/twitter/model.rb, line 233
233:     def <=>(other)
234:       self.type === other.type && self.as_of <=> other.as_of
235:     end
[](index) click to toggle source

index operator definition needed to iterate over trends in the +::Twitter::Trendline+ object using for or otherwise

     # File lib/twitter/model.rb, line 246
246:     def [](index)
247:       trends[index]
248:     end
each() click to toggle source

each definition needed by Enumerable mixin for first, …

     # File lib/twitter/model.rb, line 238
238:     def each
239:       trends.each do |t|
240:         yield t
241:       end
242:     end

Protected Instance Methods

init() click to toggle source

Constructor callback

     # File lib/twitter/model.rb, line 253
253:       def init
254:         @trends = @trends.collect do |trend|
255:  if trend.is_a?(Hash)
256:         end if @trends.is_a?(Array)
257:       end

Disabled; run with --debug to generate this.


Generated with the Darkfish Rdoc Generator 1.1.6.