Caution
JavaScript is disabled in your browser.
This site uses JavaScript for features such as search.
For the best experience, please enable JavaScript before browsing this site.
Dictionary
- Home
- Ruby Dictionary
Ruby Dictionary Index
| [Setup] Ruby Development Environment | Steps to set up an environment for installing and running Ruby. |
| String.length / size | Getting the length of a string. |
| String.include? / start_with? / end_with? | Checking string existence and prefix/suffix determination. |
| String.index / rindex | Getting the position of a substring. |
| String.slice / [] | Extracting a portion of a string. |
| String.sub / gsub | Replacing strings. |
| String.upcase / downcase / capitalize / swapcase | Converting between uppercase and lowercase. |
| String.strip / lstrip / rstrip / chomp / chop | Removing whitespace and newlines. |
| String.split | Splitting a string and converting to an array. |
| String.* / center / ljust / rjust | Repeating and padding strings. |
| String.to_i / to_f / to_sym / inspect | Converting a string to other types. |
| String.encoding / encode / force_encoding | Checking and converting character encodings. |
| sprintf() / % Operator | String formatting. |
| Array.push / pop / shift / unshift | Adding and removing elements at the end or beginning of an array. |
| Array.insert / delete / delete_at / compact | Adding, removing, and eliminating nil at arbitrary positions. |
| Array.include? / index / find_index | Checking element existence and searching positions. |
| Array.any? / all? / none? / count | Checking conditions and counting elements. |
| Array.map / collect | Transforming each array element to create a new array. |
| Array.select / filter / reject | Extracting or excluding elements matching a condition. |
| Array.reduce / inject | Combining an array into a single value. |
| Array.flatten / uniq / compact | Unnesting, removing duplicates, and removing nil. |
| Array.sort / sort_by / reverse | Sorting and reversing an array. |
| Array.concat / + / flatten / zip | Concatenating arrays. |
| Array.slice / [] / first / last | Getting a portion of an array. |
| Array.each / each_with_index / each_with_object | Looping through an array. |
| Array.join / split / flatten / product | Converting arrays to strings and computing Cartesian products. |
| Hash.keys / values / has_key? / has_value? | Listing keys and values, and checking existence. |
| Hash.fetch / store / delete / merge | Getting, setting, deleting, and merging values. |
| Hash.each / map / select / reject | Looping, transforming, and extracting from a hash. |
| Hash.to_a / Hash[] / transform_keys / transform_values | Transforming a hash. |
| Hash.filter_map / flat_map / reduce | Advanced processing on a hash. |
| Numeric.to_i / to_f / to_r / to_s | Converting number types. |
| Numeric.abs / round / ceil / floor / truncate | Absolute values and rounding numbers. |
| Math.sqrt / log / sin / cos / Math::PI | Using mathematical functions and constants. |
| Numeric.times / upto / downto / step | Iterating with integers. |
| Numeric.even? / odd? / zero? / between? / clamp | Integer determination. |
| Range.to_a / include? / cover? / each | Basic operations on range objects. |
| Range.min / max / sum / count / step | Aggregating ranges and step iteration. |
| Regexp.new / =~ / match / match? | Pattern matching with regular expressions. |
| String.scan / match / =~ | Searching strings with regular expressions. |
| Symbol.to_s / to_proc / inspect | Converting and using symbols. |
| Enumerable.find / find_all / detect | Searching for elements that match a condition. |
| Enumerable.min_by / max_by / minmax / minmax_by | Getting minimum and maximum values. |
| Enumerable.flat_map / group_by / tally | Flattening, grouping, and aggregating. |
| Enumerable.each_slice / each_cons / chunk / zip | Advanced iteration for splitting and combining. |
| Block / yield / block_given? | Defining and calling blocks. |
| Proc.new / proc / lambda / -> | Creating and executing Proc and Lambda. |
| &:method_name / Method / method() | Using symbol's to_proc and method objects. |
| File.read / write / open | Reading and writing files. |
| File.exist? / directory? / basename / dirname / extname | Path manipulation and existence checks for files. |
| Dir.glob / mkdir / pwd / entries | Directory operations. |
| begin / rescue / ensure / raise | Basic syntax for exception handling. |
| Exception Classes / StandardError / RuntimeError | Major exception classes and defining custom exceptions. |
| puts / print / p / pp | Outputting to the console. |
| object.inspect / class / is_a? / respond_to? | Debugging objects and checking types. |
| class / initialize / attr_accessor | Defining classes, creating instances, and using accessors. |
| public / private / protected | Setting access control (visibility). |
| self / Class Methods / Instance Variables / Class Variables | Using self, instance variables, and class variables. |
| module / include / extend / mixin | Using modules and mixins. |
| Inheritance / super / override | Class inheritance and calling parent methods. |
| Comparable / <=> / == | Defining and using comparison operators. |