Class: TweetStream::Status

Inherits:
Hash
  • Object
show all
Defined in:
lib/tweetstream/status.rb

Overview

A simple Hash wrapper that gives you method-based access to the properties of a Twitter status.

Instance Method Summary collapse

Methods inherited from Hash

#method_missing

Constructor Details

#initialize(hash) ⇒ Status

Returns a new instance of Status.



4
5
6
7
# File 'lib/tweetstream/status.rb', line 4

def initialize(hash)
  super
  self[:user] = TweetStream::User.new(self[:user]) if self[:user]
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class TweetStream::Hash

Instance Method Details

#idObject



9
10
11
# File 'lib/tweetstream/status.rb', line 9

def id
  self[:id] || super
end