Class: TwitterSearch::Tweet

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#languageObject (readonly)

Returns the value of attribute language.



5
6
7
# File 'lib/tweets.rb', line 5

def language
  @language
end