Class: BuildEnvironment Private
- Inherits:
-
Object
- Object
- BuildEnvironment
- Defined in:
- Library/Homebrew/build_environment.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Settings for the build environment.
Defined Under Namespace
Modules: DSL
Class Method Summary collapse
- .dump(env, f = $stdout) ⇒ Object private
- .keys(env) ⇒ Object private
Instance Method Summary collapse
- #<<(o) ⇒ Object private
-
#initialize(*settings) ⇒ BuildEnvironment
constructor
private
A new instance of BuildEnvironment.
- #merge(*args) ⇒ Object private
- #std? ⇒ Boolean private
- #userpaths? ⇒ Boolean private
Constructor Details
#initialize(*settings) ⇒ BuildEnvironment
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of BuildEnvironment.
8 9 10 |
# File 'Library/Homebrew/build_environment.rb', line 8 def initialize(*settings) @settings = Set.new(*settings) end |
Class Method Details
.dump(env, f = $stdout) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'Library/Homebrew/build_environment.rb', line 57 def self.dump(env, f = $stdout) keys = self.keys(env) keys -= %w[CC CXX OBJC OBJCXX] if env["CC"] == env["HOMEBREW_CC"] keys.each do |key| value = env[key] s = +"#{key}: #{value}" case key when "CC", "CXX", "LD" s << " => #{Pathname.new(value).realpath}" if File.symlink?(value) end s.freeze f.puts s end end |
.keys(env) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
53 54 55 |
# File 'Library/Homebrew/build_environment.rb', line 53 def self.keys(env) KEYS & env.keys end |
Instance Method Details
#<<(o) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
17 18 19 20 |
# File 'Library/Homebrew/build_environment.rb', line 17 def <<(o) @settings << o self end |
#merge(*args) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
12 13 14 15 |
# File 'Library/Homebrew/build_environment.rb', line 12 def merge(*args) @settings.merge(*args) self end |
#std? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
22 23 24 |
# File 'Library/Homebrew/build_environment.rb', line 22 def std? @settings.include? :std end |
#userpaths? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
26 27 28 |
# File 'Library/Homebrew/build_environment.rb', line 26 def userpaths? @settings.include? :userpaths end |