Sha256: fc9568604068baacf693987cf6adca724437c0701093d5b5e8da5ebd95373bd7
Contents?: true
Size: 463 Bytes
Versions: 4
Compression:
Stored size: 463 Bytes
Contents
class TweetSlim attr_accessor :text, :author, :timestamp, :id, :candidate, :orig_id def initialize(candidate,status) @text = status["text"] @author = status["user"]["screen_name"] @timestamp = status["created_at"] @id = status["id"] @candidate = candidate @orig_id = status["retweeted_status"] == nil ? nil : status["retweeted_status"]["id"] end def prettyprint puts @text.white.on_black puts "@#{@author} #{@timestamp}".blue end end
Version data entries
4 entries across 4 versions & 1 rubygems