Class: MiniSpec::PrettyPrint
- Inherits:
-
PP
- Object
- PP
- MiniSpec::PrettyPrint
- Defined in:
- lib/minispec/utils/pretty_print.rb
Instance Method Summary collapse
Instance Method Details
#text(str, width = str.length) ⇒ Object
36 37 38 39 40 41 42 43 44 |
# File 'lib/minispec/utils/pretty_print.rb', line 36 def text str, width = str.length if str.include?("\e[") super "%s\e[0m" % str, width elsif str.start_with?('#<') || str == '=' || str == '>' super highlight_object_literal(str), width else super CodeRay.scan(str, :ruby).term, width end end |