Module: Trinidad::Lifecycle::WebApp::Shared
Overview
Shared web application lifecycle hook, does #configure before the context starts.
Instance Attribute Summary collapse
-
#web_app ⇒ Object
(also: #webapp)
readonly
Returns the value of attribute web_app.
Instance Method Summary collapse
- #before_init(event) ⇒ Object
- #before_start(event) ⇒ Object
-
#configure(context) ⇒ Object
Configure the web application before it’s started.
- #initialize(web_app) ⇒ Object
Instance Attribute Details
#web_app ⇒ Object (readonly) Also known as: webapp
Returns the value of attribute web_app.
8 9 10 |
# File 'lib/trinidad/lifecycle/web_app/shared.rb', line 8 def web_app @web_app end |
Instance Method Details
#before_init(event) ⇒ Object
15 16 17 18 19 |
# File 'lib/trinidad/lifecycle/web_app/shared.rb', line 15 def before_init(event) #context = event.lifecycle #context.name = context.path if context.name super end |
#before_start(event) ⇒ Object
22 23 24 25 |
# File 'lib/trinidad/lifecycle/web_app/shared.rb', line 22 def before_start(event) super configure(event.lifecycle) end |
#configure(context) ⇒ Object
Configure the web application before it’s started.
28 29 30 31 32 33 34 |
# File 'lib/trinidad/lifecycle/web_app/shared.rb', line 28 def configure(context) adjust_context(context) remove_defaults(context) configure_default_servlet(context) configure_jsp_servlet(context) configure_logging(context) end |
#initialize(web_app) ⇒ Object
11 12 13 |
# File 'lib/trinidad/lifecycle/web_app/shared.rb', line 11 def initialize(web_app) @web_app = web_app end |