Sha256: 3f77e4be4948de876067c3639b2fdabece19006c209776ac4b0d1c86a53384c7

Contents?: true

Size: 499 Bytes

Versions: 1

Compression:

Stored size: 499 Bytes

Contents

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

module Capcode
  set :mustache, "mustache"
  
  class Index < Route '/'
    def get
      @time = Time.now
      render :mustache => :with_class
    end
  end
  
  class WithoutClass < Route '/without'
    def get
      render :mustache => :without_class, :time => Time.now
    end
  end  
end

module Capcode::Views
  class WithClass < Mustache
    def time
      @time
    end
  end
end

Capcode.run( )

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
capcode-render-mustache-0.1.0 examples/render-mustache.rb