examples/webrick.rb in webmachine-0.4.2 vs examples/webrick.rb in webmachine-1.0.0
- old
+ new
@@ -12,8 +12,12 @@
def to_html
"<html><head><title>Hello from Webmachine</title></head><body>Hello, world!</body></html>"
end
end
-Webmachine::Dispatcher.add_route([], HelloResource)
+App = Webmachine::Application.new do |app|
+ app.routes do
+ add [], HelloResource
+ end
+end
-Webmachine.run
+App.run