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

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

Instance Method Summary collapse

Instance Method Details

#inspectObject



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

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