2011-04-12 20:03:52 -04:00
|
|
|
class <%= name %> < Sinatra::Base
|
2011-04-10 22:57:22 -04:00
|
|
|
register Sinatra::Reloader
|
2011-06-16 20:21:28 -04:00
|
|
|
enable :reloader
|
2011-04-10 22:57:22 -04:00
|
|
|
<% unless inline_templates.nil? %>
|
|
|
|
enable :inline_templates
|
|
|
|
<% end %>
|
|
|
|
|
2011-06-12 13:24:43 -04:00
|
|
|
<% middlewares.each do |middleware| %>
|
|
|
|
use <%= middleware %>
|
|
|
|
<% end %>
|
|
|
|
|
2011-04-10 22:57:22 -04:00
|
|
|
<% routes.each do |route| %>
|
|
|
|
<%= route %>
|
|
|
|
<% end %>
|
|
|
|
end
|
|
|
|
|
|
|
|
<% unless inline_templates.nil? %>
|
|
|
|
__END__
|
|
|
|
|
|
|
|
<% inline_templates.each_pair do |name, content| %>
|
|
|
|
@@<%= name %>
|
|
|
|
<%= content %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|