class Foobar
def initialize
self.placeHolder = ''
end
end
bbq = Foobar.new
When I run the following code I receive a NoMethodError
. This is very confusing to me, why would I not be able to have an empty instance variable? I know I can have an empty class variable but how come when I include self
it gives me this error?