Skip to content

Instantly share code, notes, and snippets.

@ruslanpa
Created December 17, 2013 16:04
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 ruslanpa/8007343 to your computer and use it in GitHub Desktop.
Save ruslanpa/8007343 to your computer and use it in GitHub Desktop.
User class
class User
attr_accessor :name, :surname
def initialize(name, surname)
@name, @surname = name, surname
end
def full_name
"#{name} #{surname}"
end
def to_s
full_name
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment