Class: XCCache::SPM::XCFramework::Metadata::Library

Inherits:
Hash
  • Object
show all
Defined in:
lib/xccache/spm/xcframework/metadata.rb

Instance Method Summary collapse

Methods inherited from Hash

#deep_merge, #deep_merge!

Instance Method Details

#archsObject



16
17
18
# File 'lib/xccache/spm/xcframework/metadata.rb', line 16

def archs
  self["SupportedArchitectures"]
end

#idObject



8
9
10
# File 'lib/xccache/spm/xcframework/metadata.rb', line 8

def id
  self["LibraryIdentifier"]
end

#platformObject



12
13
14
# File 'lib/xccache/spm/xcframework/metadata.rb', line 12

def platform
  self["SupportedPlatform"]
end

#simulator?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/xccache/spm/xcframework/metadata.rb', line 20

def simulator?
  self["SupportedPlatformVariant"] == "simulator"
end

#triplesObject



24
25
26
27
28
# File 'lib/xccache/spm/xcframework/metadata.rb', line 24

def triples
  @triples ||= archs.map do |arch|
    simulator? ? "#{arch}-#{platform}-simulator" : "#{arch}-#{platform}"
  end
end