lib/apisync.rb in apisync-0.2.1 vs lib/apisync.rb in apisync-0.2.2

- old
+ new

@@ -14,21 +14,21 @@ @@api_key = nil @@host = nil # Verbose will do $stdout.puts. That's useful on a Rails console in # development, where logger output is ommited. - @@verbose = false + @@verbose = nil @@logger = nil attr_accessor :verbose def initialize(api_key: nil, verbose: nil, logger: nil) @api_key = api_key || @@api_key @host = @@host @verbose = verbose || @@verbose - @logger = logger || @@logger || ::Logger.new(IO::NULL) + @logger = logger || @@logger raise ArgumentError, "missing keyword: api_key" if @api_key.nil? end def method_missing(name, args = {}, &block) @@ -56,9 +56,13 @@ def self.logger=(value) @@logger = value end - def self.verbose? - !!@@verbose + def self.logger + @@logger + end + + def self.verbose + @@verbose end end