Is there any way to create a variable in a module in Ruby that would behave similar to a class variable? What I mean by this is that it would be able to be accessed without
you can set a class instance variable in the module.
module MyModule class << self; attr_accessor :var; end end MyModule.var = 'this is saved at @var' MyModule.var => "this is saved at @var"