rubyguides

RubyGuides

Learn Ruby

In-depth guides, tutorials, and a complete reference for Ruby developers at every level.

54 guides · 309 reference entries · 62 tutorials

Latest guides

View all →
  1. Ruby WebSockets: Building Real-Time Features with ActionCable rubyguides.dev/guides

    Ruby WebSockets made practical: learn websocket-ruby, ActionCable, and async-websocket for real-time chat, notifications, and live dashboards across any stack.

  2. The Builder Pattern in Ruby: Step-by-Step Object Assembly rubyguides.dev/guides

    Learn to implement the builder pattern in Ruby for cleaner step-by-step object construction with fluent interfaces, nested structures, and inline validation.

  3. The Command Pattern in Ruby: Encapsulating Actions as Reusable Objects rubyguides.dev/guides

    Implement the command pattern in Ruby — encapsulate requests as objects, enable undo/redo, queue operations, and build extensible CLI apps.

  4. Ruby array methods: map, select, reduce, and more rubyguides.dev/guides

    Learn the 7 Ruby array methods you will use every day: map, select, reduce, find, sort_by, uniq, and flatten. Practical patterns and real examples included.

  5. ActiveSupport Outside of Rails rubyguides.dev/guides

    Use ActiveSupport outside of Rails: cherry-pick core extensions, time utilities, and number helpers for plain Ruby scripts and gems without the full framework

Reference

View all →
Name Section Description
Array#min_by: pick the smallest element by a derived key Array Methods Ruby's array min_by method picks the element with the smallest derived key, with the n-argument and Enumerator forms covered.
Array#chunk_while Array Methods Use Ruby's array chunk_while to group adjacent elements into variable-size chunks. The block returns true to keep neighbors together, false to split.
Array#each_with_object Array Methods Build a hash, array, or other mutable accumulator while iterating an array. The memo you pass in is returned intact at the end.
Array#repeated_permutation Array Methods Array#repeated_permutation yields every ordered length-n tuple with replacement, or returns an Enumerator. Covers the size formula and gotchas.
Array#repeated_combination: Multiset Combinations in Ruby Array Methods Array#repeated_combination enumerates multiset combinations in Ruby. Includes the block form, the lazy Enumerator, the counting formula, and edge cases.
Array#pack Array Methods Format an array's elements into a binary string using a template of single-letter directives for integers, floats, and strings.

Tutorial series

View all →
  1. Ruby Fundamentals
  2. Rails Basics
  3. Ruby Concurrency

Latest articles

View all →
  1. Why Ruby docs benefit from small object-focused examples rubyguides.dev/articles

    Ruby docs teach better when examples stay close to objects, messages, and visible return values, with short code that keeps the reader on track.