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
- #env(*settings) ⇒ BuildEnvironment private
-
#inherited(child) ⇒ void
private
Initialise @env for each class which may use this DSL (e.g. each formula subclass).
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.
41 42 43 |
# File 'build_environment.rb', line 41 def env(*settings) T.must(@env).merge(settings) end |
#inherited(child) ⇒ void
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.
This method returns an undefined value.
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.
33 34 35 36 37 38 |
# File 'build_environment.rb', line 33 def inherited(child) super child.instance_eval do @env = T.let(BuildEnvironment.new, T.nilable(BuildEnvironment)) end end |