Module: DT

Defined in:
lib/dt.rb

Overview

Minimalistic DT.p implementation. Features:

  1. As simple as possible.

  2. Must suit any kind of project, including tiny console projects.

Sub-features:

  • No dependencies other than built-in Ruby libs. Minimum of those, too.

  • Strictly 1-file implementation (plus 1 file spec, if any).

  • Compatible with Ruby 1.9 and up.

Example:

DT.p "at control point 1"
DT.p "user", user

See Also:

Defined Under Namespace

Classes: Instance

Class Method Summary collapse

Class Method Details

.confObject

Access the configuration object.

See Also:


74
75
76
# File 'lib/dt.rb', line 74

def self.conf
  instance.conf
end

.instanceObject (private)


89
90
91
# File 'lib/dt.rb', line 89

def instance
  @instance ||= Instance.new
end

.p(*args) ⇒ Object

Print a debug message, dump values etc.

DT.p "at control point 1"
DT.p "user", user

82
83
84
# File 'lib/dt.rb', line 82

def self.p(*args)
  instance.p(args, caller)
end