watson-ruby
watson-ruby copied to clipboard
Don't use DEBUG inside Remote class but pull from calling method's class? [lib/watson/remote.rb]
filename : lib/watson/remote.rb line # : 36 tag : review md5 : 63e332a00c12dd59c26b4036206113ca
# [review] - Don't use DEBUG inside Remote class but pull from calling method's class?
# [review] - Not sure if this is the best/proper way to do things but it works...
# Identify method entry
debug_print "#{ self.class } : #{ __method__ }\n"
# Merge default options with those passed in by user to form complete opt list
opts = HTTP_opts.merge(opts)
# Check URL in hash and get URI from it, then set up HTTP connection
if opts[:url] =~ /^#{URI::regexp}$/
_uri = URI(opts[:url])
else
debug_print "No URL specified in input opts, exiting HTTP call\n"
return false
end