Skip to content

Instantly share code, notes, and snippets.

@reinh
Created May 20, 2010 06:12
Show Gist options
  • Save reinh/407255 to your computer and use it in GitHub Desktop.
Save reinh/407255 to your computer and use it in GitHub Desktop.
class TaskList
def initialize
@tasks = []
end
def add(task)
@tasks << task
end
def each
@tasks.each{ |task| yield task }
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment