Method: QAT::Configuration::Environment#each_environment

Defined in:
lib/qat/configuration/environment.rb

#each_environment {|Configuration| ... } ⇒ Object

Executes a code block in all environments of the current configuration directory

Yields:

  • block to execute

Yield Parameters:

Since:

  • 0.1.0



74
75
76
77
78
79
80
81
82
# File 'lib/qat/configuration/environment.rb', line 74

def each_environment(&block)
  old_env = @environment
  environments.sort.each do |env|
    self.environment = env
    block.call(self)
  end
ensure
  self.environment = old_env
end