Class: ObjectForge::UnBasicObject Private
- Inherits:
- BasicObject
- Defined in:
- lib/object_forge/un_basic_object.rb,
sig/object_forge.rbs
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
BasicObject with a few common methods copied from Object.
Instance methods copied from Object collapse
- #class ⇒ Class private
- #eql?(other) ⇒ Boolean private
- #freeze ⇒ self private
- #frozen? ⇒ Boolean private
- #hash ⇒ Integer private
- #inspect ⇒ String private
- #is_a? ⇒ Boolean private
- #respond_to?(symbol[, include_private]) ⇒ Boolean private
- #to_s ⇒ String private
Instance Method Summary collapse
- #block_given? ⇒ Boolean private
- #kind_of? ⇒ Boolean private
-
#pretty_print ⇒ void
Support for
pp(and IRB). -
#pretty_print_cycle ⇒ void
Support for
pp(and IRB). - #raise ⇒ void private
- #respond_to_missing? ⇒ Boolean private
Instance Method Details
#block_given? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
292 |
# File 'sig/object_forge.rbs', line 292
def block_given?: -> bool
|
#class ⇒ Class
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
37 38 39 |
# File 'lib/object_forge/un_basic_object.rb', line 37 %i[class eql? freeze frozen? hash inspect is_a? kind_of? respond_to? to_s].each do |m| define_method(m, ::Kernel.instance_method(m)) end |
#eql?(other) ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
37 38 39 |
# File 'lib/object_forge/un_basic_object.rb', line 37 %i[class eql? freeze frozen? hash inspect is_a? kind_of? respond_to? to_s].each do |m| define_method(m, ::Kernel.instance_method(m)) end |
#freeze ⇒ self
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
37 38 39 |
# File 'lib/object_forge/un_basic_object.rb', line 37 %i[class eql? freeze frozen? hash inspect is_a? kind_of? respond_to? to_s].each do |m| define_method(m, ::Kernel.instance_method(m)) end |
#frozen? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
37 38 39 |
# File 'lib/object_forge/un_basic_object.rb', line 37 %i[class eql? freeze frozen? hash inspect is_a? kind_of? respond_to? to_s].each do |m| define_method(m, ::Kernel.instance_method(m)) end |
#hash ⇒ Integer
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
37 38 39 |
# File 'lib/object_forge/un_basic_object.rb', line 37 %i[class eql? freeze frozen? hash inspect is_a? kind_of? respond_to? to_s].each do |m| define_method(m, ::Kernel.instance_method(m)) end |
#inspect ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
37 38 39 |
# File 'lib/object_forge/un_basic_object.rb', line 37 %i[class eql? freeze frozen? hash inspect is_a? kind_of? respond_to? to_s].each do |m| define_method(m, ::Kernel.instance_method(m)) end |
#is_a? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
37 38 39 |
# File 'lib/object_forge/un_basic_object.rb', line 37 %i[class eql? freeze frozen? hash inspect is_a? kind_of? respond_to? to_s].each do |m| define_method(m, ::Kernel.instance_method(m)) end |
#kind_of? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
280 |
# File 'sig/object_forge.rbs', line 280
def kind_of?: (Module klass) -> bool
|
#pretty_print ⇒ void
This method dynamically calls UnboundMethod#bind_call, making it fairly slow.
This method returns an undefined value.
Support for pp (and IRB).
52 53 54 55 56 |
# File 'lib/object_forge/un_basic_object.rb', line 52 def pretty_print(...) # We have to do it this way, instead of defining methods, # because Object#pretty_print does not exist without requiring "pp". ::Object.instance_method(:pretty_print).bind_call(self, ...) end |
#pretty_print_cycle ⇒ void
This method dynamically calls UnboundMethod#bind_call, making it fairly slow.
This method returns an undefined value.
Support for pp (and IRB).
59 60 61 62 63 64 |
# File 'lib/object_forge/un_basic_object.rb', line 59 def pretty_print_cycle(...) # See comment for #pretty_print. # :nocov: ::Object.instance_method(:pretty_print_cycle).bind_call(self, ...) # :nocov: end |
#raise ⇒ void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
This method returns an undefined value.
294 |
# File 'sig/object_forge.rbs', line 294
def raise: (_Exception exception, ?String message, ?Array[String] backtrace, ?cause: _Exception) -> void
|
#respond_to?(symbol[, include_private]) ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
37 38 39 |
# File 'lib/object_forge/un_basic_object.rb', line 37 %i[class eql? freeze frozen? hash inspect is_a? kind_of? respond_to? to_s].each do |m| define_method(m, ::Kernel.instance_method(m)) end |
#respond_to_missing? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
296 |
# File 'sig/object_forge.rbs', line 296
def respond_to_missing?: (Symbol name, bool include_all) -> bool
|
#to_s ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
37 38 39 |
# File 'lib/object_forge/un_basic_object.rb', line 37 %i[class eql? freeze frozen? hash inspect is_a? kind_of? respond_to? to_s].each do |m| define_method(m, ::Kernel.instance_method(m)) end |