Class: Rubai::RackApp

Inherits:
Object
  • Object
show all
Defined in:
lib/rubai/rack_app.rb

Instance Method Summary collapse

Instance Method Details

#call(env) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/rubai/rack_app.rb', line 4

def call(env)
  @env = env

  rack_response = RackResponse.new

  if File.file?(path)
    response = success_response
  else
    response = not_found_response
  end

  rack_response.respond_with(response)
end