Module: Kernel

Defined in:
lib/commandline/kernel.rb

Overview

This file contains additions to the Kernel module. Essentially, any functions that need global access go here.

Instance Method Summary collapse

Instance Method Details

#debug(desc, *arg) ⇒ Object

This is a simple debug that takes either a description and an argument or just an argument. We may want to add more debug statements, maybe some that use pp or inspect.



9
10
11
12
13
14
15
16
# File 'lib/commandline/kernel.rb', line 9

def debug(desc, *arg)
  return unless $DEBUG
  if arg.empty?
    puts "==>  #{desc}" 
  else
    puts "==>  #{desc}: #{arg.join(", ")}"
  end
end