0
# See the README for an overview.
0
- # this is temporay until the applications "array" becomes a hash
0
+ # A temporary measure until the applications "array" becomes a hash.
0
+ # Currently used to keep track of all loaded Waves applications.
0
class Applications < Array
0
def []( name ) ; self.find { |app| app.name == name.to_s.camel_case } ; end
0
- # Access the principal Waves application.
0
- def applications ; @applications ||= Applications.new ; end
0
- # This is being deprecated. Do not write new code against this.
0
- def application ; applications.last ; end
0
- def main ; applications.first ; end
0
- # Register a module as a Waves application.
0
- applications << app if Module === app
0
+ # The list of all loaded applications
0
+ def self.applications ; @applications ||= Applications.new ; end
0
- def instance ; Waves::Runtime.instance ; end
0
+ # Deprecated. Do not write new code against this.
0
+ def self.application ; warn "Waves.application is deprecated"; applications.last ; end
0
+ # Access the principal Waves application.
0
+ def self.main ; applications.first ; end
0
+ # Register a module as a Waves application.
0
+ applications << app if Module === app
0
- def method_missing(name,*args,&block) ; instance.send(name,*args,&block) ; end
0
+ # Returns the most recently created instance of Waves::Runtime.
0
+ def self.instance ; Waves::Runtime.instance ; end
0
+
def self.method_missing(name,*args,&block) ; instance.send(name,*args,&block) ; end
0
- # An application in Waves is anything that provides access to the Waves
0
- # runtime and the registered Waves applications. This includes both
0
- # Waves::Server and Waves::Console. Waves::Runtime is *not* the actual
0
- # application module(s) registered as Waves applications. To access the
0
- # main Waves application, you can use +Waves+.+application+.
0
+ # A Waves::Runtime takes an inert application module and gives it concrete, pokeable form.
0
+ # Waves::Server and Waves::Console are types of runtime.
0
class << self; attr_accessor :instance; end
0
@@ -56,15 +52,15 @@ module Waves
0
@mode ||= @options[:mode]||:development
0
- #
Debug is true if debug is set to true in the current configuration.
0
+ #
Returns true if debug was set to true in the current configuration.
0
def debug? ; config.debug ; end
0
- #
Access the current configuration. *Example:* +Waves::Server.config+0
+ #
Returns the current configuration.0
Waves.main::Configurations[ mode ]
0
- #
Access the mappings for the application.
0
+ #
Returns the mappings for the application.
0
def mapping ; Waves.main::Configurations[ :mapping ] ; end
0
# Reload the modules specified in the current configuration.
Comments
No one has commented yet.