Last active
October 20, 2015 11:18
-
-
Save YSRKEN/8ed7fcd4b9c1553d8e11 to your computer and use it in GitHub Desktop.
【小ネタ】ランス・アンド・マスクスの第3話にRubyのコードが載ってた ref: http://qiita.com/YSRKEN/items/b78a23b3fa7b6b2f3e2d
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
def here?(uri) | |
(current_server.uri rescue nil) == uri | |
end | |
module_function :here? | |
def config | |
current_server.config | |
rescue | |
DRbServer.make_config | |
end | |
module_function :config | |
def front | |
current_server.front | |
end | |
if RUBY_VERSION >= '1.8' | |
require 'drb/invokemethod' | |
class InvokeMethod | |
include InvokeMethod18Mixin | |
end | |
else | |
require 'drb/invokemethod16' | |
class InvokeMethod | |
include InvokeMethod16Mixin | |
end | |
def main_loop | |
Thread_ata |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment