by calling the method and then defining a proc
Uhhh yeah so actually its the proc itself that calls the method and the proc itself will be executed inside a different namespace than Metasploit::Framework::LoginScanner::HTTP I think (since your return the proc). Its not until the <proc name>.call() function is called that this actually executes so the method isn't called at this point.
Your also missing the code snippet where you actually make this call.