Module: Deployable::Debug::Id

Defined in:
lib/deployable/debug.rb

Instance Method Summary collapse

Instance Method Details

#debug(*vals) ⇒ Object



48
49
50
51
52
53
54
55
56
# File 'lib/deployable/debug.rb', line 48

def debug *vals
  return unless $debug
  if block_given?  
    yield  
  else
    text = vals[0]
    printf "debug %12s: %-16s [%s]\n", @id, text, vals[1..-1].join('] [')
  end
end

#trace(*vals) ⇒ Object



58
59
60
61
62
63
64
65
66
# File 'lib/deployable/debug.rb', line 58

def trace *vals
  return unless $trace
  if block_given?
    yield  
  else
    text = vals[0]
    printf "trace %12s: %-16s [%s]\n", @id, text, vals[1..-1].join('] [')
  end  
end