Ruby for Programmers

A minimalist’s guide to Ruby:

"strings", 'strings', :lisplikesymbol
Constant
variable
object.method()
Class::staticmethod()
$global
@instance_var
@@static_var
{ block }
do
       alternative_block
end
{ |block, args| at_beginning_of_block }
(1..3)
('a'..'z')
(0...5) # three dots = excludes last
['array', 'jfdlka']
{'hash' => 'dictionary', 'jfsdkal' => 'jfd9'}
/^regexp$/
nil
false
==
=== # if in range
if else end
"concat" << "enate"
check_for_nil.nil?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.