Sha256: 0c613f09314c3ce6f60bd1288631979fcc23669b06b8823034f981b15c9d4224

Contents?: true

Size: 480 Bytes

Versions: 2

Compression:

Stored size: 480 Bytes

Contents

$:.unshift( "../lib" )
require 'capcode'
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

2 entries across 2 versions & 1 rubygems

Version Path
Capcode-0.8.9 examples/render-mustache.rb
Capcode-0.8.8 examples/render-mustache.rb