# PP::ObjectMixin (Module)

In: | pp.rb

## Methods

pretty_print pretty_print_cycle pretty_print_inspect pretty_print_instance_variables

## Public Instance methods

pretty_print(pp)

1. specific pretty_print
2. specific inspect
3. specific to_s if instance variable is empty
4. generic pretty_print

[Source]

    # File pp.rb, line 249
        def pretty_print(pp)
          if /\(Kernel\)#/ !~ method(:inspect).inspect
            pp.text self.inspect
          elsif /\(Kernel\)#/ !~ method(:to_s).inspect && instance_variables.empty?
            pp.text self.to_s
          else
            pp.pp_object(self)
          end
        end

pretty_print_cycle(pp)

[Source]

    # File pp.rb, line 259
        def pretty_print_cycle(pp)
          pp.object_address_group(self) {
            pp.breakable
            pp.text '...'
          }
        end

pretty_print_instance_variables()

[Source]

    # File pp.rb, line 266
        def pretty_print_instance_variables
          instance_variables.sort
        end

pretty_print_inspect()

[Source]

    # File pp.rb, line 270
        def pretty_print_inspect
          if /\(PP::ObjectMixin\)#/ =~ method(:pretty_print).inspect
            raise "pretty_print is not overriden."
          end
          PP.singleline_pp(self, '')
        end

[Validate]