I'm trying to use my variable in all files of my program. this is an example of what I'm trying to do.
main.rb
Class1
def self.test1
puts "class 1" if @@debug
end
end
@@ debug = true
class.test1
class.test2
class2.rb
Class2
def self.test2
puts "test2" if @@debug
end
end
I really hope it's enough clear for the community, any help would be appreciated, thanks!