Class: TwitterSearch::Tweet
- Inherits:
-
Object
- Object
- TwitterSearch::Tweet
- Defined in:
- lib/tweets.rb
Constant Summary collapse
- VARS =
[:text, :from_user, :to_user, :to_user_id, :id, :iso_language_code, :from_user_id, :created_at, :profile_image_url, :source, :geo ]
Instance Attribute Summary collapse
-
#language ⇒ Object
readonly
Returns the value of attribute language.
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean
- #hash ⇒ Object
-
#initialize(opts) ⇒ Tweet
constructor
A new instance of Tweet.
- #to_hash ⇒ Object
Constructor Details
Instance Attribute Details
#language ⇒ Object (readonly)
Returns the value of attribute language.
5 6 7 |
# File 'lib/tweets.rb', line 5 def language @language end |
Instance Method Details
#eql?(other) ⇒ Boolean
13 14 15 |
# File 'lib/tweets.rb', line 13 def eql?(other) self.hash == other.hash end |
#hash ⇒ Object
17 18 19 |
# File 'lib/tweets.rb', line 17 def hash @id end |
#to_hash ⇒ Object
21 22 23 24 25 |
# File 'lib/tweets.rb', line 21 def to_hash hsh = Hash.new VARS.each{ |k| hsh[k] = instance_variable_get "@#{k}"} hsh end |