Class: BuildEnvironment Private
- Inherits:
-
Object
- Object
- BuildEnvironment
- Defined in:
- build_environment.rb
Overview
This class is part of a private API. This class may only be used in the Homebrew/brew repository. Third parties should avoid using this class if possible, as it may be removed or changed without warning.
Settings for the build environment.
Defined Under Namespace
Modules: DSL
Class Method Summary collapse
-
.dump(env, out = $stdout) ⇒ void
private
-
.keys(env) ⇒ Array<String>
private
Instance Method Summary collapse
-
#<<(option) ⇒ T.self_type
private
-
#initialize(*settings) ⇒ void
constructor
private
-
#merge(*args) ⇒ T.self_type
private
-
#std? ⇒ Boolean
private
Constructor Details
#initialize(*settings) ⇒ 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.
11 12 13 |
# File 'build_environment.rb', line 11 def initialize(*settings) @settings = Set.new(settings) end |
Class Method Details
.dump(env, out = $stdout) ⇒ 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.
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'build_environment.rb', line 72 def self.dump(env, out = $stdout) keys = self.keys(env) keys -= %w[CC CXX OBJC OBJCXX] if env["CC"] == env["HOMEBREW_CC"] keys.each do |key| value = env.fetch(key) string = +"#{key}: #{value}" case key when "CC", "CXX", "LD" string << " => #{Pathname.new(value).realpath}" if value.present? && File.symlink?(value) end string.freeze out.puts string end end |
.keys(env) ⇒ Array<String>
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.
67 68 69 |
# File 'build_environment.rb', line 67 def self.keys(env) KEYS & env.keys end |
Instance Method Details
#<<(option) ⇒ T.self_type
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.
22 23 24 25 |
# File 'build_environment.rb', line 22 def <<(option) @settings << option self end |
#merge(*args) ⇒ T.self_type
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.
16 17 18 19 |
# File 'build_environment.rb', line 16 def merge(*args) @settings.merge(*args) self end |
#std? ⇒ Boolean
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.
28 29 30 |
# File 'build_environment.rb', line 28 def std? @settings.include? :std end |