Module: Lotus
- Defined in:
- lib/lotus.rb,
lib/lotus/cli.rb,
lib/lotus/root.rb,
lib/lotus/loader.rb,
lib/lotus/routes.rb,
lib/lotus/static.rb,
lib/lotus/lotusrc.rb,
lib/lotus/version.rb,
lib/lotus/welcome.rb,
lib/lotus/container.rb,
lib/lotus/middleware.rb,
lib/lotus/application.rb,
lib/lotus/environment.rb,
lib/lotus/rake_helper.rb,
lib/lotus/config/mapper.rb,
lib/lotus/config/routes.rb,
lib/lotus/configuration.rb,
lib/lotus/views/default.rb,
lib/lotus/config/cookies.rb,
lib/lotus/config/mapping.rb,
lib/lotus/commands/routes.rb,
lib/lotus/commands/server.rb,
lib/lotus/config/security.rb,
lib/lotus/config/sessions.rb,
lib/lotus/routing/default.rb,
lib/lotus/views/null_view.rb,
lib/lotus/application_name.rb,
lib/lotus/commands/console.rb,
lib/lotus/commands/db/drop.rb,
lib/lotus/commands/new/app.rb,
lib/lotus/config/configure.rb,
lib/lotus/rendering_policy.rb,
lib/lotus/commands/db/apply.rb,
lib/lotus/config/load_paths.rb,
lib/lotus/commands/db/create.rb,
lib/lotus/cli_sub_commands/db.rb,
lib/lotus/commands/db/console.rb,
lib/lotus/commands/db/migrate.rb,
lib/lotus/commands/db/prepare.rb,
lib/lotus/commands/db/version.rb,
lib/lotus/commands/db/abstract.rb,
lib/lotus/generators/generator.rb,
lib/lotus/commands/generate/app.rb,
lib/lotus/commands/new/abstract.rb,
lib/lotus/action/csrf_protection.rb,
lib/lotus/action/routing_helpers.rb,
lib/lotus/commands/new/container.rb,
lib/lotus/generators/generatable.rb,
lib/lotus/cli_sub_commands/assets.rb,
lib/lotus/commands/generate/model.rb,
lib/lotus/cli_sub_commands/destroy.rb,
lib/lotus/commands/generate/action.rb,
lib/lotus/commands/generate/mailer.rb,
lib/lotus/cli_sub_commands/generate.rb,
lib/lotus/generators/test_framework.rb,
lib/lotus/commands/assets/precompile.rb,
lib/lotus/commands/generate/abstract.rb,
lib/lotus/generators/database_config.rb,
lib/lotus/commands/generate/migration.rb,
lib/lotus/views/default_template_finder.rb,
lib/lotus/config/framework_configuration.rb
Overview
A complete web framework for Ruby
Defined Under Namespace
Modules: Action, Commands, Config, Generators, Mailer, Routing, Views Classes: Application, ApplicationName, Cli, CliSubCommands, Configuration, Container, Environment, Loader, Lotusrc, Middleware, RakeHelper, RenderingPolicy, Routes, Static, Welcome
Constant Summary collapse
- DEFAULT_PUBLIC_DIRECTORY =
'public'.freeze
- VERSION =
Defines the version
'0.6.1'.freeze
Class Method Summary collapse
-
.env ⇒ String
Return the current environment.
-
.env?(*names) ⇒ TrueClass, FalseClass
Check to see if specified environment(s) matches the current environment.
-
.environment ⇒ Lotus::Environment
private
Return environment.
- .public_directory ⇒ Object
-
.root ⇒ Pathname
Return root of the project (top level directory).
Class Method Details
.env ⇒ String
Return the current environment
40 41 42 |
# File 'lib/lotus.rb', line 40 def self.env environment.environment end |
.env?(*names) ⇒ TrueClass, FalseClass
Check to see if specified environment(s) matches the current environment.
If multiple names are given, it returns true, if at least one of them matches the current environment.
68 69 70 |
# File 'lib/lotus.rb', line 68 def self.env?(*names) environment.environment?(*names) end |
.environment ⇒ Lotus::Environment
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Return environment
78 79 80 |
# File 'lib/lotus.rb', line 78 def self.environment Environment.new end |
.public_directory ⇒ Object
26 27 28 |
# File 'lib/lotus.rb', line 26 def self.public_directory root.join(DEFAULT_PUBLIC_DIRECTORY) end |
.root ⇒ Pathname
Return root of the project (top level directory).
22 23 24 |
# File 'lib/lotus.rb', line 22 def self.root environment.root end |