Class: Lotus::Welcome
- Inherits:
-
Object
- Object
- Lotus::Welcome
- Defined in:
- lib/lotus/welcome.rb
Overview
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ Welcome
constructor
A new instance of Welcome.
Constructor Details
#initialize(app) ⇒ Welcome
Returns a new instance of Welcome.
5 6 7 8 |
# File 'lib/lotus/welcome.rb', line 5 def initialize(app) @root = Pathname.new(__dir__).join('templates').realpath @body = [@root.join('welcome.html').read] end |
Instance Method Details
#call(env) ⇒ Object
10 11 12 |
# File 'lib/lotus/welcome.rb', line 10 def call(env) [200, {}, @body] end |