Sha256: 37fb783c4b67c0074d6f83b8e94733b9a83e16407fa852c4c25d427d9679487c

Contents?: true

Size: 457 Bytes

Versions: 2

Compression:

Stored size: 457 Bytes

Contents

require 'rubygems'
require 'capcode'
$:.unshift( "../lib" )
require 'capcode/render/markaby'

module Capcode
  set :markaby, { :indent => 2 }
  
  class Index < Route '/'
    def get
      @time = Time.now()
      render :markaby => :index, :layout => :glop
    end
  end  
end

module Capcode::Views
  def glop
    html do
      body do
        yield
      end
    end
  end
  
  def index
    h1 "Hello !"
    p "il est #{@time}"
  end
end

Capcode.run( )

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
capcode-render-markaby-0.2.0 examples/render-markaby.rb
capcode-render-markaby-0.1.0 examples/render-markaby.rb