Skip to content

Instantly share code, notes, and snippets.

Created May 9, 2016 09:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/48dbf3515a7460ae02db3a13b00f286a to your computer and use it in GitHub Desktop.
Save anonymous/48dbf3515a7460ae02db3a13b00f286a to your computer and use it in GitHub Desktop.
class List
end
if __FILE__ == $PROGRAM_NAME
my_list = List.new
puts 'You have created a new list'
end
class Task
attr_reader :description
def initialize(description)
@description = description
end
def to_s
@description.to_s
end
end
my_task = Task.new("Go shopping")
puts "you have created the task #{@description}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment