Sha256: 5bdd501eea789cd5396ad412bb4e6380268defd13dc51a91e8f13be55821de8a
Contents?: true
Size: 593 Bytes
Versions: 2
Compression:
Stored size: 593 Bytes
Contents
require 'pyro' require 'sinatra/base' require 'erb' class PyroServer < Sinatra::Base include Pyro set :port, 5678 set :public_folder, './builds/development' set :fast_build, false #helpers do # define_method(:script) { |*args| Pyro.script public_folder, args } # define_method(:stylesheet) { |*args| Pyro.stylesheet args } # define_method(:template) { |*args| Pyro.template args } #end get '/?' do Pyro.build('development', settings.fast_build) settings.fast_build = settings.fast File.read('./builds/development/index.html') end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
pyro-0.8.1 | lib/pyro/server.rb |
pyro-0.8.0 | lib/pyro/server.rb |