Language
日本語
English

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.

  1. Home
  2. Ruby Dictionary

Ruby Dictionary Index

[Setup] Ruby Development EnvironmentSteps to set up an environment for installing and running Ruby.
String.length / sizeGetting the length of a string.
String.include? / start_with? / end_with?Checking string existence and prefix/suffix determination.
String.index / rindexGetting the position of a substring.
String.slice / []Extracting a portion of a string.
String.sub / gsubReplacing strings.
String.upcase / downcase / capitalize / swapcaseConverting between uppercase and lowercase.
String.strip / lstrip / rstrip / chomp / chopRemoving whitespace and newlines.
String.splitSplitting a string and converting to an array.
String.* / center / ljust / rjustRepeating and padding strings.
String.to_i / to_f / to_sym / inspectConverting a string to other types.
String.encoding / encode / force_encodingChecking and converting character encodings.
sprintf() / % OperatorString formatting.
Array.push / pop / shift / unshiftAdding and removing elements at the end or beginning of an array.
Array.insert / delete / delete_at / compactAdding, removing, and eliminating nil at arbitrary positions.
Array.include? / index / find_indexChecking element existence and searching positions.
Array.any? / all? / none? / countChecking conditions and counting elements.
Array.map / collectTransforming each array element to create a new array.
Array.select / filter / rejectExtracting or excluding elements matching a condition.
Array.reduce / injectCombining an array into a single value.
Array.flatten / uniq / compactUnnesting, removing duplicates, and removing nil.
Array.sort / sort_by / reverseSorting and reversing an array.
Array.concat / + / flatten / zipConcatenating arrays.
Array.slice / [] / first / lastGetting a portion of an array.
Array.each / each_with_index / each_with_objectLooping through an array.
Array.join / split / flatten / productConverting 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 / mergeGetting, setting, deleting, and merging values.
Hash.each / map / select / rejectLooping, transforming, and extracting from a hash.
Hash.to_a / Hash[] / transform_keys / transform_valuesTransforming a hash.
Hash.filter_map / flat_map / reduceAdvanced processing on a hash.
Numeric.to_i / to_f / to_r / to_sConverting number types.
Numeric.abs / round / ceil / floor / truncateAbsolute values and rounding numbers.
Math.sqrt / log / sin / cos / Math::PIUsing mathematical functions and constants.
Numeric.times / upto / downto / stepIterating with integers.
Numeric.even? / odd? / zero? / between? / clampInteger determination.
Range.to_a / include? / cover? / eachBasic operations on range objects.
Range.min / max / sum / count / stepAggregating 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 / inspectConverting and using symbols.
Enumerable.find / find_all / detectSearching for elements that match a condition.
Enumerable.min_by / max_by / minmax / minmax_byGetting minimum and maximum values.
Enumerable.flat_map / group_by / tallyFlattening, grouping, and aggregating.
Enumerable.each_slice / each_cons / chunk / zipAdvanced 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 / openReading and writing files.
File.exist? / directory? / basename / dirname / extnamePath manipulation and existence checks for files.
Dir.glob / mkdir / pwd / entriesDirectory operations.
begin / rescue / ensure / raiseBasic syntax for exception handling.
Exception Classes / StandardError / RuntimeErrorMajor exception classes and defining custom exceptions.
puts / print / p / ppOutputting to the console.
object.inspect / class / is_a? / respond_to?Debugging objects and checking types.
class / initialize / attr_accessorDefining classes, creating instances, and using accessors.
public / private / protectedSetting access control (visibility).
self / Class Methods / Instance Variables / Class VariablesUsing self, instance variables, and class variables.
module / include / extend / mixinUsing modules and mixins.
Inheritance / super / overrideClass inheritance and calling parent methods.
Comparable / <=> / ==Defining and using comparison operators.