Class: XCFramework

Inherits:
Object
  • Object
show all
Defined in:
lib/xcframework.rb

Overview

Example data:

  • “name” : “GoogleSignIn”,

  • “container” : “GoogleSignIn.xcframework”,

  • “identifiers” : [“ios-arm64_i386_x86_64-simulator”, “ios-arm64_armv7”]

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, container, identifiers) ⇒ XCFramework

Returns a new instance of XCFramework.



12
13
14
15
16
# File 'lib/xcframework.rb', line 12

def initialize(name, container, identifiers)
  @name = name
  @container = container
  @identifiers = identifiers
end

Instance Attribute Details

#containerObject (readonly)

Returns the value of attribute container.



6
7
8
# File 'lib/xcframework.rb', line 6

def container
  @container
end

#identifiersObject (readonly)

Returns the value of attribute identifiers.



6
7
8
# File 'lib/xcframework.rb', line 6

def identifiers
  @identifiers
end

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/xcframework.rb', line 6

def name
  @name
end

Class Method Details

.parse(json) ⇒ Object



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

def self.parse(json)
  XCFramework.new(json["name"], json["container"], [json["identifier"]])
end

Instance Method Details

#==(other) ⇒ Object



18
19
20
# File 'lib/xcframework.rb', line 18

def ==(other)
  @name == other.name && @container == other.container && @identifiers == other.identifiers
end

#make_archive(platform) ⇒ Object



22
23
24
# File 'lib/xcframework.rb', line 22

def make_archive(platform)
  XCFrameworkCarthageArchive.new(name, platform)
end

#new_xcframework_by_adding_identifiers(identifiers_to_add) ⇒ Object



26
27
28
# File 'lib/xcframework.rb', line 26

def new_xcframework_by_adding_identifiers(identifiers_to_add)
  XCFramework.new(name, container, identifiers + identifiers_to_add)
end