2011-06-18 19:22:07 -04:00
|
|
|
class <%= name %> < <%= parent %>
|
|
|
|
<% if enable_reloader %>
|
2011-04-10 22:57:22 -04:00
|
|
|
register Sinatra::Reloader
|
2011-06-16 20:21:28 -04:00
|
|
|
enable :reloader
|
2011-06-18 19:22:07 -04:00
|
|
|
<% end %>
|
2011-04-10 22:57:22 -04:00
|
|
|
<% unless inline_templates.nil? %>
|
|
|
|
enable :inline_templates
|
|
|
|
<% end %>
|
|
|
|
|
2011-06-17 21:34:18 -04:00
|
|
|
<% extensions.each do |extension| %>
|
|
|
|
register <%= extension %>
|
|
|
|
<% end %>
|
|
|
|
|
2011-06-12 13:24:43 -04:00
|
|
|
<% middlewares.each do |middleware| %>
|
|
|
|
use <%= middleware %>
|
|
|
|
<% end %>
|
|
|
|
|
2011-06-16 20:45:10 -04:00
|
|
|
<% filters.each do |filter| %>
|
|
|
|
<%= filter %>
|
|
|
|
<% end %>
|
|
|
|
|
2011-06-25 19:39:26 -04:00
|
|
|
<% errors.each do |number, code| %>
|
|
|
|
error <%= number %> do
|
|
|
|
<%= code %>
|
|
|
|
end
|
|
|
|
<% 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 %>
|