Module: BuildEnvironment::DSL Private

Included in:
Formula, Requirement
Defined in:
build_environment.rb

Overview

This module is part of a private API. This module may only be used in the Homebrew/brew repository. Third parties should avoid using this module if possible, as it may be removed or changed without warning.

DSL for specifying build environment settings.

Instance Method Summary collapse

Instance Method Details

#env(*settings) ⇒ BuildEnvironment

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

Parameters:

Returns:



40
41
42
# File 'build_environment.rb', line 40

def env(*settings)
  @env.merge(settings)
end

#inherited(child) ⇒ Object

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

Initialise @env for each class which may use this DSL (e.g. each formula subclass). env may never be called and it needs to be initialised before the class is frozen.



32
33
34
35
36
37
# File 'build_environment.rb', line 32

def inherited(child)
  super
  child.instance_eval do
    @env = BuildEnvironment.new
  end
end