Sha256: 792ef3e33430914f03c20bf0682f7481fa12088a5fe7f37b881683f72b4d6eb3
Contents?: true
Size: 517 Bytes
Versions: 2
Compression:
Stored size: 517 Bytes
Contents
require 'sinatra' require 'haml' require 'fileutils' class Mercury < Sinatra::Application set :root, FileUtils.pwd.gsub("\n",'') set :public, File.dirname(__FILE__) + '/public' get '/*' do unless params["splat"][0].empty? haml params["splat"][0].to_sym, :layout => open(File.dirname(__FILE__) + '/views/layout.haml','r').read else haml open(File.dirname(__FILE__) + '/views/index.haml','r').read, :layout => open(File.dirname(__FILE__) + '/views/layout.haml','r').read end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
mercury-0.5.4 | lib/mercury.rb |
mercury-0.5.3 | lib/mercury.rb |