BasicObject#method_missing intercepts undefined methods for dynamic delegation, fluent interfaces, and small DSLs in Ruby.
Reference
Core Classes
Reference pages for Ruby core classes and constructors.
- BasicObject#method_missing
- Binding
A Binding captures Ruby's execution context — local variables, self, and method scope — so you can evaluate code later in that same environment.
- Float
The Float class represents IEEE 754 double-precision numbers in Ruby. Create and convert floating-point values while avoiding precision pitfalls and Infinity.
- Integer
Ruby's integer class handles whole numbers of any size. Covers arithmetic, bit ops, type conversion, iteration with times and step, and practical patterns.
- Kernel#block_given?
Kernel#block_given? checks if a block was passed to the current method. Write Ruby methods that adapt when a block is present or absent with this simple guard.
- Object#clone
Clone creates a shallow copy of an object in Ruby, preserving frozen status, singleton methods, and instance variables. Learn how clone differs from dup.
- Object#dup
Object#dup creates a shallow copy of a Ruby object, preserving instance variables but not the singleton class. A key tool for defensive copying in Ruby.
- Object#frozen?
Returns true if the object is frozen, false otherwise. Frozen objects cannot be modified, which helps with immutability and shared data.
- Object#instance_of?
Returns true if the object is an instance of exactly the given class, not its superclasses. Use it when a strict class check matters more than inheritance.
- Object#is_a?
Object#is_a? checks if an object is an instance of a class or any ancestor. Covers type checking, module matching, guard clauses, and dispatch patterns.
- Object#kind_of?
Ruby's Object#kind_of? method returns true if an object is an instance of the given class, module, or any ancestor in the inheritance chain. Alias for is_a?.
- 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
Object#tap yields the receiver to a block and returns the object itself, making it perfect for debugging method chains and inline configuration in Ruby.
- Object#try
Safely call a method on an object if it responds to it, and return nil otherwise. Useful for nil-safe chaining in Rails code.
- String#chomp!
String#chomp! removes trailing separators from a string in place. It mutates the receiver, returns self when it trims text, and nil when nothing is removed.