lib/pupil/base.rb in pupil-0.2.1 vs lib/pupil/base.rb in pupil-0.2.2
- old
+ new
@@ -10,20 +10,20 @@
TWITTER_API_URL = "http://api.twitter.com"
# @param [Hash] pupil_key
def initialize key
- @screen_name = key[:screen_name]
-
+ @screen_name = key[:screen_name] || nil
+
@consumer = OAuth::Consumer.new(
- key[:consumer_key],
- key[:consumer_secret],
- :site => TWITTER_API_URL
+ key[:consumer_key],
+ key[:consumer_secret],
+ :site => TWITTER_API_URL
)
@access_token = OAuth::AccessToken.new(
- @consumer,
- key[:access_token],
- key[:access_token_secret]
+ @consumer,
+ key[:access_token],
+ key[:access_token_secret]
)
end
include Essentials
end
\ No newline at end of file