rubyguides

Cookbooks

Cookbooks

Practical recipes for real-world Ruby programming tasks.

  1. How to build a frequency tally from an array

    Count repeated values in Ruby with each_with_object and a hash that defaults to zero.

  2. How to Work with Dates and Times in Ruby

    Learn how to work with dates and times in Ruby with practical examples for common tasks

  3. How to Work with Hashes in Ruby

    Practical Ruby hash recipes: default values, merging, iteration, and transformation

  4. How to work with files in Ruby

    Learn how to work with files in Ruby with practical recipes for reading, writing, checking metadata, and handling paths safely.