Sha256: 5acfd3c223cbff01c7dc71c2ecac39df43a809bb4008a25b8d1a04f4b0ddf391
Contents?: true
Size: 682 Bytes
Versions: 1
Compression:
Stored size: 682 Bytes
Contents
require 'rubygems' require 'capcode' $:.unshift( "../lib") require 'capcode/render/less' module Capcode set :less, "less" class Index < Route '/' def get @time = Time.now render :markaby => :index, :layout => :glop end end class Style < Route '/less' def get render :less => :style end end end module Capcode::Views def glop html do head do link :href => URL(Capcode::Style), :rel => 'stylesheet', :type => 'text/css' end body do yield end end end def index h1 "Hello !" p "It's #{@time}" a "Try Less !", :href => "http://lesscss.org/" end end Capcode.run( )
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
capcode-render-less-0.1.0 | examples/render-less.rb |