Sha256: e53d4441b0c09dae025446611fc303ca1bfc98872ac4ad885bfb064fa616754b
Contents?: true
Size: 692 Bytes
Versions: 3
Compression:
Stored size: 692 Bytes
Contents
require 'bundler/setup' require 'rubygems' require 'haml' require 'sinatra' require 'action_view' # for time_tag support require 'green_monkey' require 'ostruct' get '/' do @post = OpenStruct.new( html_schema_type: Mida(:BlogPosting), id: 5, title: 'Hello world', body: 'Sinatra is a DSL for quickly creating web applications in Ruby with minimal effort', created_at: Time.parse('10-feb-2012') ) haml :index end __END__ @@ index !!! 5 %html %head %body %article[@post] %a[:url]{:href => "/posts/#{@post.id}"} %h3[:name]>= @post.title .post_body[:articleBody]= @post.body = time_tag @post.created_at, itemprop: 'datePublished'
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
green_monkey-0.3.0 | sinatra_app/app_haml.rb |
green_monkey-0.2.2 | sinatra_app/app_haml.rb |
green_monkey-0.1.4 | sinatra_app/app_haml.rb |