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 ⇒ Symbol readonly private
- #type ⇒ Symbol? readonly private
Class Method Summary collapse
Instance Method Summary collapse
- #initialize(type, compiler) ⇒ void constructor private
- #type_string ⇒ String private
Constructor Details
#initialize(type, compiler) ⇒ 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.
22 23 24 25 |
# File 'cxxstdlib.rb', line 22 def initialize(type, compiler) @type = type @compiler = T.let(compiler.to_sym, Symbol) end |
Instance Attribute Details
#compiler ⇒ Symbol (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.
19 20 21 |
# File 'cxxstdlib.rb', line 19 def compiler @compiler end |
#type ⇒ Symbol? (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.
16 17 18 |
# File 'cxxstdlib.rb', line 16 def type @type end |
Class Method Details
.create(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.
9 10 11 12 13 |
# File 'cxxstdlib.rb', line 9 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 ⇒ 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.
28 29 30 |
# File 'cxxstdlib.rb', line 28 def type_string type.to_s.gsub(/cxx$/, "c++") end |