Class: ProconBypassMan::ProconDisplay::ServerApp
- Inherits:
-
Object
- Object
- ProconBypassMan::ProconDisplay::ServerApp
- Defined in:
- lib/procon_bypass_man/procon_display/server_app.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(env) ⇒ ServerApp
constructor
A new instance of ServerApp.
Constructor Details
#initialize(env) ⇒ ServerApp
Returns a new instance of ServerApp.
3 4 5 |
# File 'lib/procon_bypass_man/procon_display/server_app.rb', line 3 def initialize(env) @env = env end |
Instance Method Details
#call ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/procon_bypass_man/procon_display/server_app.rb', line 7 def call case @env["PATH"] when "/input" response = ProconBypassMan::ProconDisplay::Status.instance.current HttpResponse.new(response, status: 200).to_s else HttpResponse.new(nil, status: 404).to_s end end |