lib/hockeyhelper/networking.rb in hockeyhelper-0.0.2 vs lib/hockeyhelper/networking.rb in hockeyhelper-0.0.3
- old
+ new
@@ -5,22 +5,24 @@
module Hockey
class NullLogger < Logger
def initialize *args
end
- def debug; end
- def info; end
- def warn; end
- def error; end
- def fatal; end
+ def debug(*args); end
+ def info(*args); end
+ def warn(*args); end
+ def error(*args); end
+ def fatal(*args); end
end
# Networking Core Lib
class Networking
attr :l
- def initialize(token, debug:false)
+ def initialize(token, debug: false)
+ raise(ArgumentError, 'token must be an instance of String') unless token.kind_of?(String)
+
@client = Faraday.new(:url => 'https://rink.hockeyapp.net')
@token = token
@l = if debug
Logger.new(STDOUT)
else
\ No newline at end of file