Skip to content

Instantly share code, notes, and snippets.

@kevmor11
Created May 9, 2017 02:09
Show Gist options
  • Save kevmor11/d90fbb316fb0c492186c3de3e746b417 to your computer and use it in GitHub Desktop.
Save kevmor11/d90fbb316fb0c492186c3de3e746b417 to your computer and use it in GitHub Desktop.
Accessor practise
class Person
attr_accessor :name
def initialize(name)
@name = name
end
end
p = Person.new('L. Ron')
p.name = 'Kevin'
p p.name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment