Local module use in Rack::Auth::Basic block

If I’m using the standard Rack authorisation in a Sinatra application:

use Rack::Auth::Basic do |username, password|

end
How can I reference other code assets local to the same file, say, a
module?

In my tests, I’m getting an undefined method error if I use the module
inside the block above.

Thanks in advance,

Joe

“From rivers of sorrow, to oceans deep with hope.
I have travelled them.
Now there’s no turning back.
The limit, the sky.”

  • Chuck Schuldiner (RIP)

From: Joseph P. [email protected]
To: ruby-talk ML [email protected]
Sent: Tuesday, 18 October 2011 11:03 PM
Subject: Local module use in Rack::Auth::Basic block.

If I’m using the standard Rack authorisation in a Sinatra application:

use Rack::Auth::Basic do |username, password|

end
How can I reference other code assets local to the same file, say, a
module?

In my tests, I’m getting an undefined method error if I use the module
inside the block above.

Thanks in advance,

Joe