Skip to content

Instantly share code, notes, and snippets.

@krsnachandra
Created December 5, 2017 00:26
Show Gist options
  • Save krsnachandra/7139e0928a0d89f707ff4ef686d3ecd0 to your computer and use it in GitHub Desktop.
Save krsnachandra/7139e0928a0d89f707ff4ef686d3ecd0 to your computer and use it in GitHub Desktop.
Instance variables exercise
class Person
attr_accessor :name
def initialize(name)
@name = name
end
end
p = Person.new('L. Ron')
puts p.name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment