module Roda::RodaPlugins::Environments::ClassMethods

  1. lib/roda/plugins/environments.rb


Public Instance

  1. configure
  2. environment
  3. environment=

Public Instance methods


If no environments are given or one of the given environments matches the current environment, yield the receiver to the block.

[show source]
   # File lib/roda/plugins/environments.rb
53 def configure(*envs)
54   if envs.empty? || envs.any?{|s| s == environment}
55     yield self
56   end
57 end

The current environment for the application, which should be stored as a symbol.

[show source]
   # File lib/roda/plugins/environments.rb
61 def environment
62   opts[:environment]
63 end

Override the environment for the application, instead of using RACK_ENV.

[show source]
   # File lib/roda/plugins/environments.rb
67 def environment=(v)
68   opts[:environment] = v
69 end