Sha256: 6336c7530f792c5d6a11fa3d41f42b9d7aaa5095f91d6e937a0377d0afb9f798
Contents?: true
Size: 615 Bytes
Versions: 1
Compression:
Stored size: 615 Bytes
Contents
$:.unshift( "../lib" ) require 'capcode' require 'rubygems' module Capcode set :static, "static" before_filter :only_static, :only => [:StaticFiles] def only_static puts "-> Filter for static files!" p session puts "<- Filter for static files!" return nil end class Index < Route '/' def get session['date'] = Time.now render :markaby => :index end end end module Capcode::Views def index html do body do h1 "Hello World!" a "Show me static", :href => "/static-index.html" end end end end Capcode.run( )
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
Capcode-1.0.0 | examples/static.rb |