Class: Tw::Tweet

### Home Classes Methods

### In Files

- lib/tw/client/tweet.rb

### Parent

Object

### Methods

- ::new
- #format
- #to_json
- #to_s
- #url

### Class/Module Index

Quicksearch

- Tw
- Tw::App
- Tw::App::Main
- Tw::App::Render
- Tw::Auth
- Tw::Client
- Tw::Client::Stream
- Tw::Conf
- Tw::Error
- Tw::Tweet
- String

No matching classes.

# Tw::Tweet

### Attributes

fav_count[R]
id[R]
rt_count[R]
text[R]
time[R]
user[R]

### Public Class Methods

new(opts) click to toggle source

    # File lib/tw/client/tweet.rb, line 5
    def initialize(opts)
      @id = opts[:id]
      @user = opts[:user]
      @text = opts[:text]
      @time = opts[:time]
      @fav_count = opts[:fav_count]
      @rt_count = opts[:rt_count]
    end

### Public Instance Methods

format(fmt) click to toggle source

    # File lib/tw/client/tweet.rb, line 33
    def format(fmt)
      self.instance_eval "\"#{fmt}\""
    end

to_json(*a) click to toggle source

    # File lib/tw/client/tweet.rb, line 14
    def to_json(*a)
      {
        :id => @id,
        :user => @user,
        :text => @text,
        :time => @time,
        :fav_count => @fav_count,
        :rt_count => @rt_count
      }.to_json(*a)
    end

to_s() click to toggle source

    # File lib/tw/client/tweet.rb, line 29
    def to_s
      "@#{user} #{text} - #{time} #{url}"
    end

url() click to toggle source

    # File lib/tw/client/tweet.rb, line 25
    def url
      "http://twitter.com/#{user}/status/#{id}"
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.