Module: MongoMapper::Plugins::Inspect::InstanceMethods

Defined in:
lib/mongo_mapper/plugins/inspect.rb

Instance Method Summary collapse

Instance Method Details

#inspectObject



6
7
8
9
10
11
# File 'lib/mongo_mapper/plugins/inspect.rb', line 6

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