lib/error.rb in textmagic-0.3.3 vs lib/error.rb in textmagic-0.4.0
- old
+ new
@@ -8,13 +8,13 @@
# Creates an instance of TextMagic::API::Error. Error code and error message
# can be supplied as arguments or in a hash.
#
# TextMagic::API::Error.new(code, message)
- # TextMagic::API::Error.new('error_code' => code, 'error_message' => message)
+ # TextMagic::API::Error.new("error_code" => code, "error_message" => message)
def initialize(*args)
if args.first.is_a?(Hash)
- @code, @message = args.first['error_code'], args.first['error_message']
+ @code, @message = args.first["error_code"], args.first["error_message"]
else
@code, @message = args
end
end