Class: NYNY::App
Constant Summary
Constants inherited
from Base
Base::HTTP_VERBS
Class Method Summary
collapse
Methods inherited from Base
after, after_initialize, before, before_initialize, #call, constraints, define_route, helpers, #initialize, #initialize_builder, map, namespace, register, use
included
Constructor Details
This class inherits a constructor from NYNY::Base
Class Method Details
12
13
14
15
16
|
# File 'lib/nyny/app.rb', line 12
def configure *envs, &block
if envs.map(&:to_sym).include?(NYNY.env.to_sym) or envs.empty?
instance_eval(&block)
end
end
|
.run!(port = 9292) ⇒ Object
18
19
20
21
22
|
# File 'lib/nyny/app.rb', line 18
def run! port=9292
use Rack::CommonLogger
use BetterErrors::Middleware unless NYNY.env.production?
Rack::Handler.pick(['puma', 'thin', 'webrick']).run new, :Port => port
end
|