Class: Servel::HomeApp
- Inherits:
-
Object
- Object
- Servel::HomeApp
- Defined in:
- lib/servel/home_app.rb
Constant Summary collapse
- FAVICON_PATH =
"/favicon.ico"
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(roots) ⇒ HomeApp
constructor
A new instance of HomeApp.
Constructor Details
#initialize(roots) ⇒ HomeApp
Returns a new instance of HomeApp.
4 5 6 |
# File 'lib/servel/home_app.rb', line 4 def initialize(roots) @roots = roots end |
Instance Method Details
#call(env) ⇒ Object
8 9 10 11 |
# File 'lib/servel/home_app.rb', line 8 def call(env) return [404, {}, []] if env["PATH_INFO"] == FAVICON_PATH Servel::HamlContext.render('home.haml', { roots: @roots }) end |