Skip to content

Instantly share code, notes, and snippets.

@reinh
Created May 20, 2010 06:17
Show Gist options
  • Save reinh/407261 to your computer and use it in GitHub Desktop.
Save reinh/407261 to your computer and use it in GitHub Desktop.
class TaskList
include Enumerable
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