Sha256: a3ba974da1fc91209689f2743435028175527e0b9354583b28de0f6cfc8dcc08

Contents?: true

Size: 337 Bytes

Versions: 61

Compression:

Stored size: 337 Bytes

Contents

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

Version data entries

61 entries across 61 versions & 8 rubygems

Version Path
pwnash-mongo_mapper-0.7.5 lib/mongo_mapper/plugins/inspect.rb
mongo_mapper-0.7.6 lib/mongo_mapper/plugins/inspect.rb
mongo_mapper-0.7.5 lib/mongo_mapper/plugins/inspect.rb
mongo_mapper_ign-0.7.4 lib/mongo_mapper/plugins/inspect.rb
mongo_mapper-0.7.4 lib/mongo_mapper/plugins/inspect.rb
mongo_mapper-0.7.3 lib/mongo_mapper/plugins/inspect.rb
numon-0.0.1 lib/mongo_mapper/plugins/inspect.rb
mongo_mapper-0.7.2 lib/mongo_mapper/plugins/inspect.rb
mongo_mapper-0.7.1 lib/mongo_mapper/plugins/inspect.rb
mongo_mapper-unstable-2010.3.8 lib/mongo_mapper/plugins/inspect.rb
mongo_mapper-unstable-2010.3.5 lib/mongo_mapper/plugins/inspect.rb
mongo_mapper-unstable-2010.3.4 lib/mongo_mapper/plugins/inspect.rb
mongo_mapper-unstable-2010.3.3 lib/mongo_mapper/plugins/inspect.rb
drogus-mongo_mapper-0.6.10 lib/mongo_mapper/plugins/inspect.rb
mongo_mapper-unstable-2010.2.28 lib/mongo_mapper/plugins/inspect.rb
mongo_mapper-unstable-2010.2.27 lib/mongo_mapper/plugins/inspect.rb
mongo_mapper-unstable-2010.2.26 lib/mongo_mapper/plugins/inspect.rb
mongo_mapper-unstable-2010.2.25 lib/mongo_mapper/plugins/inspect.rb
mongo_mapper-unstable-2010.2.24 lib/mongo_mapper/plugins/inspect.rb
mongo_mapper-unstable-2010.2.23 lib/mongo_mapper/plugins/inspect.rb