Module: Halcyon
- Includes:
- Config::Helpers
- Defined in:
- lib/halcyon.rb,
lib/halcyon/client.rb,
lib/halcyon/config.rb,
lib/halcyon/runner.rb,
lib/halcyon/logging.rb,
lib/halcyon/client/ssl.rb,
lib/halcyon/controller.rb,
lib/halcyon/exceptions.rb,
lib/halcyon/application.rb,
lib/halcyon/config/file.rb,
lib/halcyon/config/paths.rb,
lib/halcyon/logging/log4r.rb,
lib/halcyon/config/helpers.rb,
lib/halcyon/logging/logger.rb,
lib/halcyon/runner/helpers.rb,
lib/halcyon/logging/helpers.rb,
lib/halcyon/logging/logging.rb,
lib/halcyon/runner/commands.rb,
lib/halcyon/application/hooks.rb,
lib/halcyon/logging/analogger.rb,
lib/halcyon/application/router.rb,
lib/halcyon/runner/helpers/command_helper.rb
Overview
Provides global values, like the root of the current application directory, the current logger, the application name, and the framework version.
Examples
Halcyon.app #=> AppName
Halcyon.root #=> Dir.pwd
Halcyon.config #=> {:allow_from => :all, :logging => {...}, ...}
Halcyon.paths #=> {:config => Halcyon.root/'config', ...}
Halcyon.logger #=> #<Logger>
Halcyon.version #=> "0.5.2"
Defined Under Namespace
Modules: Exceptions, Logging Classes: Application, Client, Config, Controller, Runner
Constant Summary collapse
- VERSION =
[0,5,4]
Class Attribute Summary collapse
-
.config ⇒ Object
Configuration accessor which creates a configuration object when necessary.
-
.logger ⇒ Object
Returns the value of attribute logger.
Class Method Summary collapse
-
.linux? ⇒ Boolean
Tests for Linux platform.
-
.root ⇒ Object
The default
root
setting, overwritten by a configuration helper. - .version ⇒ Object
-
.windows? ⇒ Boolean
Tests for Windows platform (to compensate for numerous Windows-specific bugs and oddities.).
Methods included from Config::Helpers
Class Attribute Details
.config ⇒ Object
Configuration accessor which creates a configuration object when necessary.
51 52 53 |
# File 'lib/halcyon.rb', line 51 def config @config ||= Halcyon::Config.new end |
.logger ⇒ Object
Returns the value of attribute logger.
32 33 34 |
# File 'lib/halcyon.rb', line 32 def logger @logger end |
Class Method Details
.linux? ⇒ Boolean
Tests for Linux platform.
Returns Boolean:is_linux
68 69 70 |
# File 'lib/halcyon.rb', line 68 def linux? RUBY_PLATFORM =~ /linux/ end |
.root ⇒ Object
The default root
setting, overwritten by a configuration helper. This is so that the paths can be loaded when first booting the app. This won’t be necessary for certain cases where the paths the root is manually configured, but for all other cases it can cause problems.
44 45 46 |
# File 'lib/halcyon.rb', line 44 def root Dir.pwd end |
.version ⇒ Object
35 36 37 |
# File 'lib/halcyon.rb', line 35 def version VERSION.join('.') end |
.windows? ⇒ Boolean
Tests for Windows platform (to compensate for numerous Windows-specific bugs and oddities.)
Returns Boolean:is_windows
60 61 62 |
# File 'lib/halcyon.rb', line 60 def windows? RUBY_PLATFORM =~ /mswin/ end |