i'm trying to learn ruby, i have this code.
#!/usr/bin/ruby
randomNumber = 5
class Testing
def self.add
puts randomNumber * 6
end
end
Testing.add
And i get the error "Undefined local variable or method 'randomNumber'... But i have defined it .. so i thought, with the randomNumber = 5 .. i've tried int randomNumber = 5 but still no help. I have a feeling my oop sucks and i need to do more reading but i just don't get why this isn't working. Thanks for any help