Sha256: 792e12ea17aea6a23fbca0e379658a98528aa6ed7d408744e2a4ae354377211f
Contents?: true
Size: 672 Bytes
Versions: 9
Compression:
Stored size: 672 Bytes
Contents
module Semlogr module Formatters class PropertyValueFormatter QUOTE = '"'.freeze def self.format(output, property_value) case property_value when nil output << '(nil)'.freeze when String output << QUOTE output << property_value output << QUOTE when StandardError output << "#{property_value.class}: #{property_value.message}" if property_value.backtrace output << "\n\s\s#{property_value.backtrace.join("\n\s\s")}" end output << "\n" else output << property_value.to_s end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems