Created
May 9, 2016 09:35
-
-
Save anonymous/48dbf3515a7460ae02db3a13b00f286a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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