Skip to content

Instantly share code, notes, and snippets.

@vireshas
Created January 23, 2017 07:01
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 vireshas/7b157274428e7753d02a3911eb6f0eb4 to your computer and use it in GitHub Desktop.
Save vireshas/7b157274428e7753d02a3911eb6f0eb4 to your computer and use it in GitHub Desktop.
self.a and @A
class A
attr_accessor :a
def initialize
self.a = 100
end
def b
puts @a
end
end
A.new.b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment