Skip to content

Instantly share code, notes, and snippets.

@jhannah
Created June 9, 2015 15:19
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 jhannah/8a075b48ccc50b7af24e to your computer and use it in GitHub Desktop.
Save jhannah/8a075b48ccc50b7af24e to your computer and use it in GitHub Desktop.
Ruby returns
class Player
attr_accessor :name, :move, :score
def initialize(name, score: 0)
@name = name
@score = score
end
end
j = Player.new("jay")
puts j.name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment