class Grande::Context
Attributes
app[R]
Public Class Methods
instance()
click to toggle source
# File lib/grande/context.rb, line 16 def self.instance @instance ||= new end
Public Instance Methods
run_after_fork()
click to toggle source
If one is using forking servers, this could should be run to re-setup all DB connections
# File lib/grande/context.rb, line 29 def run_after_fork @app.restore_db_connections_after_fork end
set_app(app)
click to toggle source
# File lib/grande/context.rb, line 20 def set_app(app) raise "App can't be set twice" if @app raise 'App can only be set if in booting phase' unless app.booting? @app = app end