Class: CxxStdlib 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.
Combination of C++ standard library and compiler.
Instance Attribute Summary collapse
- #compiler ⇒ Object readonly private
- #type ⇒ Object readonly private
Class Method Summary collapse
- .create(type, compiler) ⇒ Object private
Instance Method Summary collapse
-
#initialize(type, compiler) ⇒ CxxStdlib
constructor
private
A new instance of CxxStdlib.
- #type_string ⇒ Object private
Constructor Details
#initialize(type, compiler) ⇒ CxxStdlib
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.
Returns a new instance of CxxStdlib.
16 17 18 19 |
# File 'cxxstdlib.rb', line 16 def initialize(type, compiler) @type = type @compiler = compiler.to_sym end |
Instance Attribute Details
#compiler ⇒ Object (readonly)
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 |
# File 'cxxstdlib.rb', line 14 def compiler @compiler end |
#type ⇒ Object (readonly)
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 |
# File 'cxxstdlib.rb', line 14 def type @type end |
Class Method Details
.create(type, compiler) ⇒ 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.
8 9 10 11 12 |
# File 'cxxstdlib.rb', line 8 def self.create(type, compiler) raise ArgumentError, "Invalid C++ stdlib type: #{type}" if type && [:libstdcxx, :libcxx].exclude?(type) CxxStdlib.new(type, compiler) end |
Instance Method Details
#type_string ⇒ 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.
21 22 23 |
# File 'cxxstdlib.rb', line 21 def type_string type.to_s.gsub(/cxx$/, "c++") end |