Skip to content

Instantly share code, notes, and snippets.

@jedediah
Created August 21, 2009 02:37
Show Gist options
  • Save jedediah/171608 to your computer and use it in GitHub Desktop.
Save jedediah/171608 to your computer and use it in GitHub Desktop.
require 'gserver'
def listen port=9999, &block
Class.new GServer do
define_method :serve, &block
end.new(port).start
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment