Class: Lotus::Welcome

Inherits:
Object
  • Object
show all
Defined in:
lib/lotus/welcome.rb

Overview

Since:

  • 0.1.0

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ Welcome

Returns a new instance of Welcome.

Since:

  • 0.1.0



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

Since:

  • 0.1.0



10
11
12
# File 'lib/lotus/welcome.rb', line 10

def call(env)
  [200, {}, @body]
end