Sha256: 1f3d31a34f445dea588cfc9bda63490369f8b52ae61e4b2654900b463f01387f
Contents?: true
Size: 306 Bytes
Versions: 1
Compression:
Stored size: 306 Bytes
Contents
#!/usr/bin/env ruby $:<< '../lib' << 'lib' require 'goliath' require 'yajl' class EnvUseStatements < Goliath::API if Goliath.dev? use Goliath::Rack::Render, 'json' elsif Goliath.prod? use Goliath::Rack::Render, 'xml' end def response(env) [200, {}, {'Test' => 'Response'}] end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
goliath-0.9.2 | examples/env_use_statements.rb |