Module: Brochure
- Defined in:
- lib/brochure.rb,
lib/brochure/errors.rb,
lib/brochure/static.rb,
lib/brochure/context.rb,
lib/brochure/failsafe.rb,
lib/brochure/template.rb,
lib/brochure/application.rb
Defined Under Namespace
Classes: Application, CaptureNotSupported, Context, Error, Failsafe, Static, Template, TemplateNotFound
Constant Summary
collapse
- VERSION =
"0.5.4"
Class Method Summary
collapse
Class Method Details
.app(root, options = {}) {|app| ... } ⇒ Object
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# File 'lib/brochure.rb', line 16
def self.app(root, options = {})
app = Application.new(root, options)
yield app if block_given?
app = Static.new(app, app.asset_root)
if development?
app = Rack::ShowExceptions.new(app)
else
app = Failsafe.new(app)
end
app
end
|
.development? ⇒ Boolean
30
31
32
|
# File 'lib/brochure.rb', line 30
def self.development?
ENV["RACK_ENV"] == "development"
end
|