Intercept calls to undefined methods. method_missing is called when an object responds to no method by that name — use it to implement dynamic delegation, fl...
Reference
Core Classes
Reference pages for Ruby core classes and constructors.
- BasicObject#method_missing
- Binding
An object that encapsulates the execution context, including local variables, self, and method scope.
- Float
A numeric class representing IEEE 754 double-precision floating-point numbers.
- Integer
The core class for whole numbers, including Fixnum (smaller) and Bignum (larger) in older Ruby.
- Kernel#block_given?
Returns true if a block was passed to the current method, otherwise returns false.
- Object#clone
Create a shallow copy of an object. clone copies both instance variables and singleton class.
- Object#dup
Create a shallow copy of an object. dup copies instance variables but not singleton methods.
- Object#frozen?
Returns true if the object is frozen (immutable), false otherwise. Frozen objects cannot be modified.
- Object#instance_of?
Returns true if the object is an instance of exactly the given class, not its superclasses.
- Object#is_a?
Checks whether an object is an instance of a given class or any of its superclasses. Returns true or false.
- Object#kind_of?
Returns true if the object is an instance of the given class or any of its superclasses.
- Object#nil?
The nil? method returns true if an object is nil, false otherwise. It's the standard way to check for nil values in Ruby.
- Object#object_id
Returns a unique integer identifier for a Ruby object. This integer is the object's memory address in the MRI implementation.
- Object#respond_to?
Checks whether an object responds to a given method, returning true or false. Essential for duck typing and dynamic method handling in Ruby.
- Object#send
Invokes the named method on the object, passing any arguments. send is the foundation for dynamic method calls in Ruby.
- Object#tap
Yields the object to a block and returns the object itself, useful for debugging or method chaining.
- Object#try
Safely call a method on an object if it responds to it, returns nil otherwise
- String#chomp!
Removes trailing record separators from a string in-place. Modifies the original string.