I want to have an instance of a Ruby class I wrote initialized as a
single instance on app startup, and have that instance accessible from
my controllers. I assume this is simple, but have not been able to
figure this out.
Where do I initialize the class? And how can I access it from my
I assume it is something like (env.rb......
$myclassinstance = MyClass.new
and then (foobar-controller.rb........
@myvars = $myclassinstance.mymethod( params[:somevar] )
Thanks for reading,