Class: Object

Inherits:
BasicObject
Defined in:
lib/rider_server/core_ext/object.rb

Overview

object.rb – Object class extensions

Author: Russell Sim Copyright © 2024 Russell Sim SPDX-License-Identifier: MIT

Instance Method Summary collapse

Instance Method Details

#rider_displayObject

Return a string representation of the object in a consistent manner that will not be excessivly long.



13
14
15
16
17
18
19
# File 'lib/rider_server/core_ext/object.rb', line 13

def rider_display
  if defined?(inspect) && method(:inspect).owner != Object && method(:inspect).owner != Kernel
    inspect
  else
    "#<#{self.class} #{object_id}>"
  end
end

#rider_inspectObject



21
22
23
# File 'lib/rider_server/core_ext/object.rb', line 21

def rider_inspect
  Object.instance_method(:inspect).bind_call(self)
end