Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
lobby/lib/lobby.rb
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
30 lines (25 sloc)
636 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
# Simply the "root class" of this library, to expediate things. | |
class LobbyConstructor | |
Version = 1 | |
## | |
# This method is responsible for constructing the "lobby environment." | |
def self.construct! | |
lobby = ::Kernel::lobby | |
def lobby.inspect | |
"lobby" | |
end | |
root_object_eigenclass = class<<lobby;self;end | |
::Kernel.send :const_set, "Lobby", root_object_eigenclass | |
def root_object_eigenclass.inspect | |
"Lobby" | |
end | |
end | |
end | |
module ::Kernel | |
## | |
# This method returns the global "root object," also known as "main." | |
def lobby | |
::Kernel.eval('self', ::TOPLEVEL_BINDING) | |
end | |
end |