Module: RicDebug
- Included in:
- String
- Defined in:
- lib/classes/debug_ric.rb
Overview
copied from Mixins in Programming ruby book, pag 119
Instance Method Summary collapse
- #to_verbose_s ⇒ Object
- #trace ⇒ Object
-
#whoami? ⇒ Boolean
$stderr.puts “DEBUG: including module RicDebug, as a mixin within #selfself.class”.
Instance Method Details
#to_verbose_s ⇒ Object
18 19 20 |
# File 'lib/classes/debug_ric.rb', line 18 def to_verbose_s() whoami? end |
#trace ⇒ Object
12 13 14 15 16 |
# File 'lib/classes/debug_ric.rb', line 12 def trace() puts "== Riccardo Debug Trace program (excuse verboity) ==" puts "File: #{__FILE__}" #TODO put verbose context like call stack, ... end |
#whoami? ⇒ Boolean
$stderr.puts “DEBUG: including module RicDebug, as a mixin within #RicDebug.selfself.class”
8 9 10 |
# File 'lib/classes/debug_ric.rb', line 8 def whoami? "#{self.class.name} (\##{self.object_id}): #{self}" end |