Sha256: 968333e31a2b36aeaa8056fde87312a9cb267f9c6e56b215cd35cdc07fd39086
Contents?: true
Size: 430 Bytes
Versions: 18
Compression:
Stored size: 430 Bytes
Contents
# encoding: UTF-8 module MongoMapper module Plugins module Inspect extend ActiveSupport::Concern def inspect(include_nil = false) keys = include_nil ? key_names : attributes.keys attributes_as_nice_string = keys.sort.collect do |name| "#{name}: #{self.send(:"#{name}").inspect}" end.join(", ") "#<#{self.class} #{attributes_as_nice_string}>" end end end end
Version data entries
18 entries across 18 versions & 3 rubygems