module Sequel::Plugins::InspectPk::InstanceMethods

Private Instance Methods

inspect_pk() click to toggle source

The primary key value to include in the inspect output, if any. For composite primary keys, this only includes a value if all fields are present.

   # File lib/sequel/plugins/inspect_pk.rb
27 def inspect_pk
28   if primary_key && (pk = self.pk) && (!(Array === pk) || pk.all?)
29     pk
30   end
31 end
inspect_prefix() click to toggle source

Include the instance’s primary key in the output.

Calls superclass method
   # File lib/sequel/plugins/inspect_pk.rb
34 def inspect_prefix
35   if v = inspect_pk
36     "#{super}[#{v.inspect}]"
37   else
38     super
39   end
40 end