Initializing a Global Instance of a Ruby Class


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 =
and then (foobar-controller.rb........
def foo
  @myvars = $myclassinstance.mymethod( params[:somevar] )
Thanks for reading,