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?
About this entry
You’re currently reading “ Ruby for Programmers ,” an entry on bluebones.net
- Published:
- 2005.05.18
- Category:
- Programming
No comments
Jump to comment form | comments rss [?] | trackback uri [?]