Skip to content

Instantly share code, notes, and snippets.

@danielbonnell
Created October 9, 2014 15:13
Show Gist options
  • Save danielbonnell/04b4e76785a2e296f801 to your computer and use it in GitHub Desktop.
Save danielbonnell/04b4e76785a2e296f801 to your computer and use it in GitHub Desktop.
person
class Person
def initialize(first_name,last_name)
@first_name = first_name
@last_name = last_name
@full_name = @first_name + " " + @last_name
end
def print
puts "My name is #{@full_name}."
puts "My name is #{@first_name} #{@last_name}."
end
end
john = Person.new('John','Hamm')
john.print
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment