Module: XCCache::Swift::Swiftc
- Defined in:
- lib/xccache/swift/swiftc.rb
Class Method Summary collapse
Class Method Details
.version ⇒ Object
4 5 6 7 8 9 |
# File 'lib/xccache/swift/swiftc.rb', line 4 def self.version @version ||= begin m = /Apple Swift version ([\d\.]+)/.match(Sh.capture_output("xcrun swift -version")) m.nil? ? "6.0" : m[1] end end |
.version_without_patch ⇒ Object
11 12 13 |
# File 'lib/xccache/swift/swiftc.rb', line 11 def self.version_without_patch version.split(".")[...2].join(".") end |