Method: Hanami::Web::Welcome#call
- Defined in:
- lib/hanami/web/welcome.rb
#call(env) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
21 22 23 24 25 26 27 28 29 |
# File 'lib/hanami/web/welcome.rb', line 21 def call(env) request_path = env["REQUEST_PATH"] || "" request_host = env["HTTP_HOST"] || "" template_path = File.join(__dir__, "welcome.html.erb") body = [ERB.new(File.read(template_path)).result(binding)] [200, {}, body] end |