Module: Waw::ScopeUtils
- Included in:
- WLang::HostedLanguage, EnvironmentUtils, FullState::Variable, Waw::StaticController::AbstractMatcher, Waw::StaticController::WawAccess, Waw::StaticController::WawAccess::Match, WSpec::DSL
- Defined in:
- lib/waw/scope_utils.rb
Instance Method Summary collapse
-
#config ⇒ Object
Returns waw resources.
-
#find_kernel_context ⇒ Object
(also: #kernel)
Find the kernel context whose call must be delegated to.
-
#logger ⇒ Object
Logger to use.
-
#params ⇒ Object
Request parameters.
-
#rack_env ⇒ Object
Returns the current Rack env instance.
-
#real_session ⇒ Object
Returns the current Rack session.
-
#request ⇒ Object
Returns the current Rack request instance.
-
#resources ⇒ Object
Returns waw resources.
-
#response ⇒ Object
Returns the current Rack request instance.
-
#root_folder ⇒ Object
Returns the root folder.
-
#session ⇒ Object
Returns the waw session decorator.
Instance Method Details
#config ⇒ Object
Returns waw resources
21 22 23 |
# File 'lib/waw/scope_utils.rb', line 21 def config find_kernel_context.config end |
#find_kernel_context ⇒ Object Also known as: kernel
Find the kernel context whose call must be delegated to.
5 6 7 8 9 10 |
# File 'lib/waw/scope_utils.rb', line 5 def find_kernel_context return self.waw_kernel if self.respond_to?(:waw_kernel) return Waw.kernel if Waw.kernel Waw.logger.warn("Using a empty kernel because no one has been found") Waw::Kern::App.new("Empty autoloaded kernel").autoload(File.join(File.dirname(__FILE__), 'kern', 'empty')) end |
#logger ⇒ Object
Logger to use
26 27 28 |
# File 'lib/waw/scope_utils.rb', line 26 def logger find_kernel_context.logger end |
#params ⇒ Object
Request parameters
53 54 55 |
# File 'lib/waw/scope_utils.rb', line 53 def params find_kernel_context.params end |
#rack_env ⇒ Object
Returns the current Rack env instance
38 39 40 |
# File 'lib/waw/scope_utils.rb', line 38 def rack_env find_kernel_context.rack_env end |
#real_session ⇒ Object
Returns the current Rack session
60 61 62 |
# File 'lib/waw/scope_utils.rb', line 60 def real_session find_kernel_context.real_session end |
#request ⇒ Object
Returns the current Rack request instance
43 44 45 |
# File 'lib/waw/scope_utils.rb', line 43 def request find_kernel_context.request end |
#resources ⇒ Object
Returns waw resources
31 32 33 |
# File 'lib/waw/scope_utils.rb', line 31 def resources find_kernel_context.resources end |
#response ⇒ Object
Returns the current Rack request instance
48 49 50 |
# File 'lib/waw/scope_utils.rb', line 48 def response find_kernel_context.response end |
#root_folder ⇒ Object
Returns the root folder
16 17 18 |
# File 'lib/waw/scope_utils.rb', line 16 def root_folder find_kernel_context.root_folder end |
#session ⇒ Object
Returns the waw session decorator
65 66 67 |
# File 'lib/waw/scope_utils.rb', line 65 def session find_kernel_context.session end |