Sha256: bd111b9e35c482b9222774bfbae1bb950bb8e6a19ca6ee9d1b740213940959be
Contents?: true
Size: 894 Bytes
Versions: 6
Compression:
Stored size: 894 Bytes
Contents
require 'rubygems' require 'trellis' include Trellis module Simplest class Simplest < Application home :start end class Start < Page attr_accessor :current_time def initialize @current_time = Time.now end template do # using Markaby xhtml_strict { head { title "Simplest Trellis Application" } body { h1 "Simplest Trellis Application" p "One Application, One Page, Two Components" p "The time below should change after each request." p { text "The current time is: " text %[<trellis:value name="current_time">${currentTime}.</trellis:value>] } p { text %[[<trellis:page_link tpage="start">refresh</trellis:page_link>]] } } } end end Simplest.new.start if __FILE__ == $PROGRAM_NAME end
Version data entries
6 entries across 6 versions & 1 rubygems