lib/bitly/url.rb in bitly-0.3.1 vs lib/bitly/url.rb in bitly-0.3.2
- old
+ new
@@ -7,10 +7,10 @@
attr_reader :info, :stats
VARIABLES = ['long_url', 'short_url', 'hash', 'user_hash']
def initialize(login,api_key,obj=nil)
unless obj.nil?
- raise BitlyError.new(result['errorMessage'],result['errorCode']) if obj['statusCode'] == "ERROR"
+ raise BitlyError.new(obj['errorMessage'],obj['errorCode']) if obj['statusCode'] == "ERROR"
instance_variablise(obj, VARIABLES)
@info = obj[:info] if obj[:info]
@stats = obj[:stats] if obj[:stats]
end
@login = login
\ No newline at end of file