Skip to content

Instantly share code, notes, and snippets.

@cannikin
Created March 24, 2009 16:41
Show Gist options
  • Select an option

  • Save cannikin/84201 to your computer and use it in GitHub Desktop.

Select an option

Save cannikin/84201 to your computer and use it in GitHub Desktop.
class Poller
def self.call(env)
if env["PATH_INFO"] =~ /^\/poller/
[200, {"Content-Type" => "text/html"}, [Time.now.to_f]]
else
[404, {"Content-Type" => "text/html"}, ["Not Found"]]
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment