Module: Array::PrettyInspect
- Included in:
- Array
- Defined in:
- lib/pretty_debug.rb
Constant Summary collapse
- SingleLength =
50
Instance Method Summary collapse
Instance Method Details
#inspect ⇒ Object
244 245 246 247 248 249 |
# File 'lib/pretty_debug.rb', line 244 def inspect return super if recursive? s = map(&:inspect) length < 2 || s.map(&:length).inject(:+) < SingleLength ? "[#{s.join(", ")}]" : "[#$/#{s.join(",#$/").indent}#$/]" end |