Module: OneGadget::Logger

Defined in:
lib/one_gadget/logger.rb

Overview

A logger for internal usage.

Class Method Summary collapse

Class Method Details

.ask_update(msg: '') ⇒ void

This method returns an undefined value.

Show the message of ask user to update gem.


36
37
38
39
40
# File 'lib/one_gadget/logger.rb', line 36

def ask_update(msg: '')
  name = 'one_gadget'
  cmd = OneGadget::Helper.colorize("gem update #{name} && gem cleanup #{name}")
  OneGadget::Logger.info(msg + "\n" + "Update with: $ #{cmd}" + "\n")
end

.not_found(build_id) ⇒ Object

Show warning message of no such build id in database.


29
30
31
32
# File 'lib/one_gadget/logger.rb', line 29

def not_found(build_id)
  warn("Cannot find BuildID [#{build_id}]\n")
  []
end