Module: DT
- Defined in:
- lib/dt.rb
Overview
Minimalistic DT.p
implementation. Features:
-
As simple as possible.
-
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
Defined Under Namespace
Classes: Instance
Class Method Summary collapse
-
.conf ⇒ Object
Access the configuration object.
- .instance ⇒ Object private
-
.p(*args) ⇒ Object
Print a debug message, dump values etc.
Class Method Details
.conf ⇒ Object
Access the configuration object.
74 75 76 |
# File 'lib/dt.rb', line 74 def self.conf instance.conf end |
.instance ⇒ Object (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 |