V
victor.reyes
Note: parts of this message were removed by the gateway to make it a legal Usenet post.
I started playing with classes and to that effect, I put this simple
do-nothing class just to make sure I can invoke a method within a class.
class Test
def mag(size)
maxLoop = size * size
r1 = Array.new(size) {1}
p r1
end # End method mag
end # End class
mag.Test 9
I am getting this error:
C:\$user\ruby\Programs\DejaVou>ruby Test.rb
Test.rb:9: undefined local variable or method `mag' for main:Object
(NameError)
Any ideas anyone?
I am sure it is something trivial, but, trivial or not I can't get it.
Thank you
Victor
I started playing with classes and to that effect, I put this simple
do-nothing class just to make sure I can invoke a method within a class.
class Test
def mag(size)
maxLoop = size * size
r1 = Array.new(size) {1}
p r1
end # End method mag
end # End class
mag.Test 9
I am getting this error:
C:\$user\ruby\Programs\DejaVou>ruby Test.rb
Test.rb:9: undefined local variable or method `mag' for main:Object
(NameError)
Any ideas anyone?
I am sure it is something trivial, but, trivial or not I can't get it.
Thank you
Victor