Skip to content

Instantly share code, notes, and snippets.

@nolman
Created May 22, 2010 19:32
Show Gist options
  • Save nolman/410298 to your computer and use it in GitHub Desktop.
Save nolman/410298 to your computer and use it in GitHub Desktop.
#vlad code, why on earth would you do this...???
def export receiver, *methods
methods.each do |method|
eval "def #{method} *args, █ #{receiver}.#{method}(*args, &block);end"
end
end
export "Thread.current[:task]", :get, :put, :rsync, :run, :sudo, :target_host
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment