Module: Waves

Extended by:
Forwardable
Defined in:
lib/waves/media/mime_types.rb,
lib/waves.rb,
lib/waves/ext/hash.rb,
lib/waves/ext/float.rb,
lib/waves/ext/module.rb,
lib/waves/ext/object.rb,
lib/waves/layers/mvc.rb,
lib/waves/caches/file.rb,
lib/waves/ext/integer.rb,
lib/waves/views/mixin.rb,
lib/waves/helpers/form.rb,
lib/waves/matchers/ext.rb,
lib/waves/matchers/uri.rb,
lib/waves/servers/base.rb,
lib/waves/views/errors.rb,
lib/waves/caches/simple.rb,
lib/waves/helpers/basic.rb,
lib/waves/matchers/path.rb,
lib/waves/runtime/mocks.rb,
lib/waves/matchers/query.rb,
lib/waves/request/accept.rb,
lib/waves/runtime/logger.rb,
lib/waves/runtime/rackup.rb,
lib/waves/runtime/server.rb,
lib/waves/matchers/accept.rb,
lib/waves/matchers/traits.rb,
lib/waves/renderers/mixin.rb,
lib/waves/request/request.rb,
lib/waves/resources/mixin.rb,
lib/waves/resources/paths.rb,
lib/waves/runtime/console.rb,
lib/waves/runtime/runtime.rb,
lib/waves/servers/mongrel.rb,
lib/waves/servers/webrick.rb,
lib/waves/views/templated.rb,
lib/waves/caches/memcached.rb,
lib/waves/dispatchers/base.rb,
lib/waves/foundations/rest.rb,
lib/waves/helpers/doc_type.rb,
lib/waves/matchers/request.rb,
lib/waves/matchers/resource.rb,
lib/waves/response/packaged.rb,
lib/waves/response/response.rb,
lib/waves/helpers/formatting.rb,
lib/waves/matchers/requested.rb,
lib/waves/response/redirects.rb,
lib/waves/caches/synchronized.rb,
lib/waves/dispatchers/default.rb,
lib/waves/foundations/classic.rb,
lib/waves/foundations/compact.rb,
lib/waves/layers/orm/migration.rb,
lib/waves/runtime/applications.rb,
lib/waves/layers/mvc/extensions.rb,
lib/waves/layers/renderers/haml.rb,
lib/waves/runtime/configuration.rb,
lib/waves/layers/mvc/controllers.rb,
lib/waves/layers/rack/rack_cache.rb,
lib/waves/response/client_errors.rb,
lib/waves/layers/renderers/erubis.rb,
lib/waves/response/response_mixin.rb,
lib/waves/layers/renderers/markaby.rb,
lib/waves/layers/orm/providers/sequel.rb,
lib/waves/layers/text/inflect/english.rb,
lib/waves/layers/orm/providers/filebase.rb,
lib/waves/layers/orm/providers/data_mapper.rb,
lib/waves/layers/orm/providers/active_record.rb

Overview

TODO:

Maybe split this out into 5-20 really common MIME types and allow importing the rest with some switch (and of course just introducing them.) This might lead to some space/runtime savings. –rue

Defined Under Namespace

Modules: Cache, Caches, Configurations, Controllers, Dispatchers, Ext, Foundations, Helpers, Layers, Logger, Matchers, Mocks, Renderers, Resources, ResponseMixin, Runtime, Servers, Views Classes: Accept, Applications, Console, Rackup, Request, Response, Server

Constant Summary collapse

MimeTypes =

Mapping from file extensions to MIME types.

Each extension may have multiple types. Originally taken from Mongrel.

Hash.new {|h, k| h[k] = [] }
MimeExts =

MIME type to extension mapping.

Broadly the inverse of MimeTypes, but there may be some differences in usage. MimeExts type indexes always point to an Array of extensions.

See Also:

Hash.new {|h, k| h[k] = [] }

Class Method Summary collapse

Class Method Details

.<<(app) ⇒ Object

Register a module as a Waves application.



16
# File 'lib/waves/runtime/applications.rb', line 16

def self.<< ( app ) ; applications << app ; end

.applicationsObject

The list of all loaded applications



10
# File 'lib/waves/runtime/applications.rb', line 10

def self.applications ; @applications ||= Applications.new ; end

.configObject



7
# File 'lib/waves/runtime/applications.rb', line 7

def self.config; instance.config ; end

.instanceObject

Returns the most recently created instance of Waves::Runtime.



41
# File 'lib/waves/runtime/runtime.rb', line 41

def instance ; Waves::Runtime.instance ; end

.licenseObject



74
# File 'lib/waves.rb', line 74

def self.license ; File.read( File.expand_path( "#{File.dirname(__FILE__)}/../doc/LICENSE" ) ) ; end

.mainObject

Access the principal Waves application.



13
# File 'lib/waves/runtime/applications.rb', line 13

def self.main ; applications.first ; end

.versionObject



73
# File 'lib/waves.rb', line 73

def self.version ; File.read( File.expand_path( "#{File.dirname(__FILE__)}/../doc/VERSION" ) ) ; end