Sha256: fe012c55bb6ed3d12209a7a6b8b83bf94d30dabd6bb55149e95e5d44d0847218

Contents?: true

Size: 360 Bytes

Versions: 2

Compression:

Stored size: 360 Bytes

Contents

# encoding: UTF-8
module MongoMapper
  module Plugins
    module Inspect
      module InstanceMethods
        def inspect
          attributes_as_nice_string = key_names.sort.collect do |name|
            "#{name}: #{self[name].inspect}"
          end.join(", ")
          "#<#{self.class} #{attributes_as_nice_string}>"
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ign-mongo_mapper-0.8.6.2 lib/mongo_mapper/plugins/inspect.rb
ign-mongo_mapper-0.8.6.1 lib/mongo_mapper/plugins/inspect.rb