Method: Moped::Protocol::Message#inspect

Defined in:
lib/moped/protocol/message.rb

#inspectString

Returns the nicely formatted version of the message.

Returns:

  • (String)

    the nicely formatted version of the message



327
328
329
330
331
332
333
# File 'lib/moped/protocol/message.rb', line 327

def inspect
  fields = self.class.fields.map do |field|
    "@#{field}=" + __send__(field).inspect
  end
  "#<#{self.class.name}\n" <<
  "  #{fields * "\n  "}>"
end