diff options
author | Ralph Amissah <ralph@amissah.com> | 2012-12-28 12:18:24 -0500 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2012-12-28 12:18:24 -0500 |
commit | 6998914adc0bacd41398ab0ed3d2f0bf5af74358 (patch) | |
tree | eb33a62ac5d18b8269b3a82a056a4360ba18f30c /lib/sisu/v4/constants.rb | |
parent | v4 (v3): 4.0.1 (3.3.4) new branch & version & changelog "opened" (diff) |
v4 v3: debug (internal code use), color markers for line number & file name
* colored location markers to show when line passed within running code
Diffstat (limited to 'lib/sisu/v4/constants.rb')
-rw-r--r-- | lib/sisu/v4/constants.rb | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/sisu/v4/constants.rb b/lib/sisu/v4/constants.rb index af5c13a4..02bbc286 100644 --- a/lib/sisu/v4/constants.rb +++ b/lib/sisu/v4/constants.rb @@ -243,6 +243,27 @@ S_CONF={ header_make: 'sisu_document_make', rc_yml: 'sisurc.yml', } +ANSI_C={ + red: "\033[#{31}m", + green: "\033[#{32}m", + yellow: "\033[#{33}m", + blue: "\033[#{34}m", + fuchsia: "\033[#{35}m", + cyan: "\033[#{36}m", + inv_red: "\033[#{41}m", + inv_green: "\033[#{42}m", + inv_yellow: "\033[#{43}m", + inv_blue: "\033[#{44}m", + inv_fuchsia: "\033[#{45}m", + inv_cyan: "\033[#{46}m", + b_red: "\033[#{91}m", + b_green: "\033[#{92}m", + b_yellow: "\033[#{93}m", + b_blue: "\033[#{94}m", + b_fuchsia: "\033[#{95}m", + b_cyan: "\033[#{96}m", + off: "\033[m" +} DISABLE={ epub: { internal_navigation: true, @@ -254,6 +275,12 @@ DEVELOPER={ maintenance: :false, } __END__ +puts SiSU_Debug::Mark.new(__LINE__,__FILE__,:red).set +puts SiSU_Debug::Mark.new(__LINE__,__FILE__).set(:green) +puts ANSI_C[:red] + __LINE__.to_s + ANSI_C[:off] + ' ' + __FILE__ +puts "#{ANSI_C[:red]} #{__LINE__.to_s} #{ANSI_C[:off]} #{__FILE__}" +puts ANSI_C[:fuchsia] + __LINE__.to_s + ANSI_C[:off] + ' ' + __FILE__.gsub(/([^\/]+$)/,"#{ANSI_C[:fuchsia]}\\1#{ANSI_C[:off]}") +puts ANSI_C[:red] + __LINE__.to_s + ANSI_C[:off] + ' ' + __FILE__.gsub(/([^\/]+$)/,"#{ANSI_C[:red]}\\1#{ANSI_C[:off]}") consider: 〔comment〕 〔links?????〕 |