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 ]
Instance Attribute Summary collapse
-
#language ⇒ Object
readonly
Returns the value of attribute language.
Instance Method Summary collapse
-
#initialize(opts) ⇒ Tweet
constructor
A new instance of Tweet.
Constructor Details
#initialize(opts) ⇒ Tweet
Returns a new instance of Tweet.
7 8 9 10 |
# File 'lib/tweets.rb', line 7 def initialize(opts) @language = opts['iso_language_code'] VARS.each { |each| instance_variable_set "@#{each}", opts[each.to_s] } end |
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 |