Module: Perception

Defined in:
lib/perception/const.rb,
lib/perception/logging.rb,
lib/perception/numeric.rb,
lib/perception/date_and_time.rb,
lib/perception/string_spread.rb,
lib/perception/perception_main.rb,
lib/perception/perception_private.rb

Overview

Perception: Human perceptible printouts

Welcome to Perception. It’s a intuitive toolkit for simple everyday debugging. Perception offers a powerfull replacement for print, puts and pp and is an alternative to Awesome Print.

You get auto-intended and structured output on your console without any configuration.

Perception also offers temporary printouts (overwritten by the next print), printing two informations in one line without destroying the structure and optionally slows down printing to readable speed, depending on the complexity of the output.

Defined Under Namespace

Modules: NumericI, StringSpreadI, TimeI Classes: SeeSession

Constant Summary collapse

TIME_FORMATS =
{
    #           0             1                   2                     3                       4
      :iso => [ '%Y-%m-%d',   '%Y-%m-%d  %H:%M',  '%Y-%m-%d  %H:%M:%S', '%Y-%m-%d  %H:%M:%S',   '%Y-%m-%d %A %H:%M:%S'  ],
      :de  => [ '%d.%b.%Y',   '%d.%b.%Y  %H:%M',  '%d.%b.%Y  %H:%M:%S', '%d. %B %Y  %H:%M:%S',  '%A, %d. %B %Y  %H:%M:%S'  ]   # %e is not working
}
RULER =
r100 + r100 + "\n" + r10 + r10
SEE_PERCEPTION_TIME_PER_WORD =
200
SEE_TAB_WIDTH =

automatic indention

2
SEE_LEVEL_START =
1
SEE_INDENT_START =
false
PPP_KOMMA =

nicht verwenden: 07..13, 27

1.chr
PPP_SEARCH =
2.chr
PPP_GESCHW_KLAMMER_AUF =
3.chr
PPP_GESCHW_KLAMMER_ZU =
4.chr
PPP_ECKIGE_KLAMMER_AUF =
5.chr
PPP_ECKIGE_KLAMMER_ZU =
6.chr
PPP_SPITZE_KLAMMER_AUF =
14.chr
PPP_SPITZE_KLAMMER_ZU =
15.chr
PPP_PFEIL =
16.chr+16.chr
PPP_TUDDELCHEN1 =
17.chr
PPP_TUDDELCHEN2 =
18.chr
PPP_ANTI_NEWLINE =
31.chr
PPP_TR_ARRAY_P =

codieren: P => Q, in P fehlen derzeit die spitzen Klammern, weil sonst Hash nicht funktioniert decodieren: Q => R

%q{'"{}[]<>}
PPP_TR_ARRAY_Q =
PPP_TUDDELCHEN1 + PPP_TUDDELCHEN2 +
PPP_GESCHW_KLAMMER_AUF + PPP_GESCHW_KLAMMER_ZU +  
PPP_ECKIGE_KLAMMER_AUF + PPP_ECKIGE_KLAMMER_ZU + 
PPP_SPITZE_KLAMMER_AUF + PPP_SPITZE_KLAMMER_ZU
PPP_TR_ARRAY_R =
%q{'"{}[]<>}
PPP_TR_ALL =
PPP_TR_ARRAY_Q + PPP_KOMMA + PPP_ANTI_NEWLINE