Added support for Ruby v2 Specialization (#1101)
* Added support for Ruby v2 Specialization * Added ruby v2 example with builder code
This commit is contained in:
committed by
Ta-Ching Chen
parent
f104f0b46b
commit
c717f182b6
@@ -7,10 +7,10 @@ module Fission
|
||||
def self.call(env)
|
||||
context = Context.new(env)
|
||||
|
||||
response = if method(:handler).arity > 0
|
||||
handler(context)
|
||||
response = if $handler.arity > 0
|
||||
$handler.call(context)
|
||||
else
|
||||
handler
|
||||
$handler.call
|
||||
end
|
||||
|
||||
response.is_a?(Array) ? response : Rack::Response.new([response]).finish
|
||||
|
||||
Reference in New Issue
Block a user