Class: Lotus::Welcome
- Inherits:
-
Object
- Object
- Lotus::Welcome
- Defined in:
- lib/lotus/welcome.rb
Overview
Instance Method Summary collapse
- #application_name ⇒ Object
- #call(env) ⇒ Object
-
#initialize(app) ⇒ Welcome
constructor
A new instance of Welcome.
Constructor Details
#initialize(app) ⇒ Welcome
Returns a new instance of Welcome.
8 9 10 11 |
# File 'lib/lotus/welcome.rb', line 8 def initialize(app) @root = Pathname.new(__dir__).join('templates').realpath @body = [ERB.new(@root.join('welcome.html.erb').read).result(binding)] end |
Instance Method Details
#application_name ⇒ Object
17 18 19 |
# File 'lib/lotus/welcome.rb', line 17 def application_name " #{ app }" if container? end |
#call(env) ⇒ Object
13 14 15 |
# File 'lib/lotus/welcome.rb', line 13 def call(env) [200, {}, @body] end |