Sha256: ee1a64526a81723bc32fd2deedc917b3e8124311742c4d17480d6ccf9a924a07
Contents?: true
Size: 638 Bytes
Versions: 2
Compression:
Stored size: 638 Bytes
Contents
$:.unshift( "../lib" ) require 'capcode' require 'capcode/render/static' require 'coderay' require 'rack/codehighlighter' module Capcode set :static, "static" set :verbose, true use Rack::Codehighlighter, :coderay, :element => "pre", :pattern => /\A:::(\w+)\s*\n/, :logging => false class Index < Route '/' def get render :static => "index.html" end end class Path < Route '/path' def get render :static => "index.html", :exact_path => false end end class Style < Route '/style' def get render :static => "coderay.css", :exact_path => false end end end Capcode.run( )
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
Capcode-0.8.8 | examples/render-use.rb |
Capcode-0.8.7 | examples/render-use.rb |