Module: Raad
- Defined in:
- lib/raad/env.rb,
lib/raad/logger.rb,
lib/raad/runner.rb,
lib/raad/service.rb,
lib/raad/version.rb,
lib/raad/configuration.rb
Defined Under Namespace
Modules: Configuration, Logger Classes: Runner, Service
Constant Summary collapse
- VERSION =
"0.3.1"
Class Method Summary collapse
-
.development? ⇒ Boolean
Determines if we are in the development environment.
-
.env ⇒ Symbol
Retrieves the current environment.
-
.env=(env) ⇒ Object
Sets the current environment.
-
.production? ⇒ Boolean
Determines if we are in the production environment.
-
.stage? ⇒ Boolean
Determines if we are in the staging environment.
-
.test? ⇒ Boolean
Determines if we are in the test environment.
Class Method Details
.development? ⇒ Boolean
Determines if we are in the development environment
34 35 36 |
# File 'lib/raad/env.rb', line 34 def development? @env == :development end |
.env ⇒ Symbol
Retrieves the current environment
8 9 10 |
# File 'lib/raad/env.rb', line 8 def env @env end |
.env=(env) ⇒ Object
Sets the current environment
15 16 17 18 19 20 21 22 |
# File 'lib/raad/env.rb', line 15 def env=(env) case(env.to_s) when 'dev', 'development' then @env = :development when 'prod', 'production' then @env = :production when 'stage', 'staging' then @env = :stage when 'test' then @env = :test end end |
.production? ⇒ Boolean
Determines if we are in the production environment
27 28 29 |
# File 'lib/raad/env.rb', line 27 def production? @env == :production end |
.stage? ⇒ Boolean
Determines if we are in the staging environment
41 42 43 |
# File 'lib/raad/env.rb', line 41 def stage? @env == :stage end |
.test? ⇒ Boolean
Determines if we are in the test environment
48 49 50 |
# File 'lib/raad/env.rb', line 48 def test? @env == :test end |