Sha256: 00e2d60b211254f93c9fb74eefadd703f45e3820c02be337cfb6e6a834679e6c
Contents?: true
Size: 549 Bytes
Versions: 3
Compression:
Stored size: 549 Bytes
Contents
#\ -w -p 8765 use Rack::Reloader, 0 use Rack::ContentLength require 'pp' require 'hubris' class Fibonacci hubris :source => 'Fibonacci.hs' end def arg_from env #env['REQUEST_URI'] ? env['REQUEST_URI'].to_s.sub(/^\//, '').to_i : 0 env['PATH_INFO'] ? env['PATH_INFO'].to_s.sub(/^\//, '').to_i : 0 end app = proc do |env| value = Fibonacci.new.fibonacci( arg_from env ) [ 200, {'Content-Type' => 'text/plain'}, "The fib number is #{value }" ] # [ 200, {'Content-Type' => 'text/plain'}, "The fib number is #{arg_from env}" ] end run app
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
hubris-0.0.6 | sample/config.ru |
hubris-0.0.5 | sample/config.ru |
hubris-0.0.4 | sample/config.ru |