Sha256: 92b029eb875a3e7513b4d57c4719a734f736eea397b405f4268e6b296a3a41f7

Contents?: true

Size: 610 Bytes

Versions: 1

Compression:

Stored size: 610 Bytes

Contents

require "hike"
require "rack"
require "tilt"

module Brochure
  VERSION = "0.2.0"

  autoload :Application,      "brochure/application"
  autoload :Context,          "brochure/context"
  autoload :Failsafe,         "brochure/failsafe"
  autoload :TemplateNotFound, "brochure/errors"

  def self.app(root)
    app = Application.new(root)
    if development?
      app = Rack::ShowExceptions.new(app)
    else
      app = Failsafe.new(app)
    end
    app
  end

  def self.camelize(string)
    string.gsub(/(^|_)(\w)/) { $2.upcase }
  end

  def self.development?
    ENV["RACK_ENV"] == "development"
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
brochure-0.2.0 lib/brochure.rb