Class: BuildEnvironment Private
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.
9 10 11 |
# File 'build_environment.rb', line 9 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.
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'build_environment.rb', line 68 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.
63 64 65 |
# File 'build_environment.rb', line 63 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.
20 21 22 23 |
# File 'build_environment.rb', line 20 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.
14 15 16 17 |
# File 'build_environment.rb', line 14 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.
26 27 28 |
# File 'build_environment.rb', line 26 def std? @settings.include? :std end |