I'm learning ruby dev coming from java and I dont understand why im getting below error. @test is a class variable so I should be able to output it ?
C:/Projects/RubyPlayground/Tester.rb:6:in `test': wrong number of arguments (ArgumentError)
from C:/Projects/RubyPlayground/Tester.rb:6:in `testMethod'
from C:/Projects/RubyPlayground/Tester.rb:10
source:
class Tester
@test = "here"
def testMethod()
puts test
end
s = Tester.new()
s.testMethod()
end