Class: Array
Overview
Redefine string representation of Array
Instance Method Summary collapse
Instance Method Details
#to_s ⇒ Object
44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/lorj/compat.rb', line 44 def to_s '[' + map do |a| if a.is_a?(String) "\"#{a}\"" elsif a.is_a?(Symbol) ":#{a}" else a.to_s end end.join(', ') + ']' end |