Class: Upwork::Api::Logger

Inherits:
Object
  • Object
show all
Defined in:
lib/upwork/api/logger.rb

Overview

Logger for debug process

Instance Method Summary collapse

Instance Method Details

#i(str, param = nil) ⇒ Object

Print information string and dump parameter if any

Arguments:

str: (String)
param: (Mixed)


23
24
25
26
27
28
29
30
31
32
# File 'lib/upwork/api/logger.rb', line 23

def i(str, param = nil)
  if $DEBUG
    puts "> #{str}"
    if param
      puts "<< dump-begin >>"
      p param
      puts "<< dump-end >>"
    end
  end
end