comparison app/models/tweet.rb @ 73:e9a6019a34ea

Avoid using constant. Use global instead =D
author nanaya <me@myconan.net>
date Fri, 13 May 2016 04:52:20 +0900
parents 37356e98b784
children 0c023d35cd80
comparison
equal deleted inserted replaced
72:257910c60eb3 73:e9a6019a34ea
17 end 17 end
18 end 18 end
19 19
20 def initialize(twitter_id) 20 def initialize(twitter_id)
21 @client = Twitter::REST::Client.new do |config| 21 @client = Twitter::REST::Client.new do |config|
22 CFG[:twitter].each do |cfg_key, cfg_value| 22 $cfg[:twitter].each do |cfg_key, cfg_value|
23 config.public_send("#{cfg_key}=", cfg_value) 23 config.public_send("#{cfg_key}=", cfg_value)
24 end 24 end
25 end 25 end
26 @twitter_id = twitter_id 26 @twitter_id = twitter_id
27 end 27 end