Skip to content

Instantly share code, notes, and snippets.

@radar
Created September 29, 2010 04:06
Show Gist options
  • Save radar/602279 to your computer and use it in GitHub Desktop.
Save radar/602279 to your computer and use it in GitHub Desktop.

Ruby Intro - Setlist

  • no fucking semi-colons (unless you really want them)
  • irb
  • local variable definition
  • +, *, /, - are all methods
  • puts vs print
  • multiplying strings
  • using if & when
  • defining a method
  • defining a method with arguments
  • defining a method with infinite arguments
  • Passing arguments to another method
  • send
  • Defining a class
  • Adding attributes
  • Building new objects
  • Class methods
  • Modules
  • include vs extend
  • Defining module methods
  • Namespacing
  • Regular Expressions
  • Arrays vs Hashes (starring: map, each, inject and Hash#[])
  • Numeric (starring: times, upto)
  • Ranges
  • lambdas & procs
  • Ecosystem
@eladmeidar
Copy link

fun natives: #times, #upto... Array arithmetics and fun with strings ( [1,2,3] - [1,2], "a"* 6 )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment