Skip to main content

Ruby Cheatsheet

New

Ruby syntax, blocks/procs/lambdas, arrays/hashes, enumerable methods, and symbols.

rubyreferencecheatsheet
Read the guide
Shortcuts:⌘ KSearch
0 entries

Frequently Asked Questions

Does it explain the difference between a Proc and a lambda?

It gives you separate entries for Proc and lambda and notes that lambdas are stricter about arity and return behavior. It is concise, but the distinction is explicitly covered.

Can I use this to review Enumerable methods quickly?

Yes. The Enumerable section includes map, select, reject, find, reduce, each_with_index, and any?/all? patterns.

Are nil-safe access patterns like dig or safe navigation in it?

Yes. There are dedicated entries for hash.dig(...) and object&.method so you can look up both styles of safer nested access.

If I search for a method name, is it only checking titles?

No. The filter also checks the syntax, description, and example snippets, which makes searches like upcase, fetch, or transform_keys work well.

When I click Copy syntax, does it copy the short mnemonic or real code?

It copies the full syntax snippet stored for that Ruby card. The compact text is just the on-screen summary.

Related Tools