Class: Object
- Inherits:
- BasicObject
- Defined in:
- lib/core_ext/object.rb
Overview
Reopen the core Object class to add #identify to all objects.
Instance Method Summary collapse
-
#identify(*args, **kargs) ⇒ String
Instance method for constructing a self-identifying string for any given object or list of objects.
-
#inspect_lit ⇒ String
Standard #inspect for any object that doesn’t override this method.
Instance Method Details
#identify(*args) ⇒ String #identify(*args, options) ⇒ String
Instance method for constructing a self-identifying string for any given object or list of objects.
42 43 44 |
# File 'lib/core_ext/object.rb', line 42 def identify(*args, **kargs) ObjectIdentifier::Identifier.identify(self, *args, **kargs) end |
#inspect_lit ⇒ String
Standard #inspect for any object that doesn’t override this method. This method is meant to make an object’s type inherently obvious inspected.
9 10 11 |
# File 'lib/core_ext/object.rb', line 9 def inspect_lit inspect end |