lib/valnzbn.rb in valnzbn-0.1.2 vs lib/valnzbn.rb in valnzbn-0.1.3
- old
+ new
@@ -6,12 +6,12 @@
end
def exists?(options = {})
response = Valnzbn::Lookup.validate(@number, options)
- if !response.nil? && !response['entityStatusCode'].nil? && !%w(62 80).include?(response['entityStatusCode'])
+ if !response.nil? && !response[:entityStatusCode].nil? && !%w(62 80).include?(response[:entityStatusCode])
options[:detail] == true ? response : true
- elsif !response.nil? && (%w(62 80).include?(response['entityStatusCode']) || !response['entityStatusCode'].nil? || {}.empty?)
+ elsif !response.nil? && (%w(62 80).include?(response[:entityStatusCode]) || !response[:entityStatusCode].nil? || {}.empty?)
options[:detail] == true ? response : false
else
nil
end
end