Skip to content

Instantly share code, notes, and snippets.

@lolmaus
Created April 21, 2011 13:32
Show Gist options
  • Save lolmaus/934472 to your computer and use it in GitHub Desktop.
Save lolmaus/934472 to your computer and use it in GitHub Desktop.
Class Person
def initialize(args={})
@name = args[:name]
raise "No name given" unless @name && @name.length > 0
end
end
print "Please input name: "
begin
a_person = Person.new(name: gets.chomp)
rescue
# What do i write here?
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment