Sha256: 0bb6e9f7a0339bbee65d45194bd6081412a4a558626bd5bff8c4fcadffbcf0e6

Contents?: true

Size: 669 Bytes

Versions: 1

Compression:

Stored size: 669 Bytes

Contents

module Polygon
  class Base < Sinatra::Base

    configure do
      set :public_folder, Proc.new { 'content/static'                }
      set :views,         Proc.new { 'design/views'                  }
      set :database,      Proc.new { Database.new('content/dynamic') }
      set :wlang,         :layout => :"layouts/html5"
      enable  :logging
      enable  :raise_errors
      disable :show_exceptions
    end

    not_found do
      send_file settings.public_folder + '/404.html', :status => 404
    end

    error do
      send_file settings.public_folder + '/500.html', :status => 500
    end

    helpers Polygon::Helpers
  end # Base
end # module Polygon

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
polygon-0.9.1 lib/polygon/base.rb