class Pod::BuildType

Constants

KNOWN_LINKAGE_OPTIONS

@return [Array<Symbol>] known linking options.

KNOWN_PACKAGING_OPTIONS

@return [Array<Symbol>] known packaging options.

Attributes

hash[R]
linkage[R]

@return [Symbol] the linkage for this build type, one of #KNOWN_LINKAGE_OPTIONS

packaging[R]

@return [Symbol] the packaging for this build type, one of #KNOWN_PACKAGING_OPTIONS

Public Class Methods

dynamic_framework() click to toggle source

@return [BuildType] the build type for a dynamic framework

# File lib/cocoapods-core/build_type.rb, line 46
def self.dynamic_framework
  new(:linkage => :dynamic, :packaging => :framework)
end
dynamic_library() click to toggle source

@return [BuildType] the build type for a dynamic library

# File lib/cocoapods-core/build_type.rb, line 34
def self.dynamic_library
  new(:linkage => :dynamic, :packaging => :library)
end
new(linkage: :static, packaging: :library) click to toggle source
# File lib/cocoapods-core/build_type.rb, line 21
def initialize(linkage: :static, packaging: :library)
  unless KNOWN_LINKAGE_OPTIONS.include?(linkage)
    raise ArgumentError, "Invalid linkage option #{linkage.inspect}, valid options are #{KNOWN_LINKAGE_OPTIONS.inspect}"
  end
  unless KNOWN_PACKAGING_OPTIONS.include?(packaging)
    raise ArgumentError, "Invalid packaging option #{packaging.inspect}, valid options are #{KNOWN_PACKAGING_OPTIONS.inspect}"
  end
  @packaging = packaging
  @linkage = linkage
  @hash = packaging.hash ^ linkage.hash
end
static_framework() click to toggle source

@return [BuildType] the build type for a static framework

# File lib/cocoapods-core/build_type.rb, line 52
def self.static_framework
  new(:linkage => :static, :packaging => :framework)
end
static_library() click to toggle source

@return [BuildType] the build type for a static library

# File lib/cocoapods-core/build_type.rb, line 40
def self.static_library
  new(:linkage => :static, :packaging => :library)
end

Public Instance Methods

==(other) click to toggle source
# File lib/cocoapods-core/build_type.rb, line 116
def ==(other)
  linkage == other.linkage &&
    packaging == other.packaging
end
dynamic?() click to toggle source

@return [Boolean] whether the target is built dynamically

# File lib/cocoapods-core/build_type.rb, line 58
def dynamic?
  linkage == :dynamic
end
dynamic_framework?() click to toggle source

@return [Boolean] whether the target is built as a dynamic framework

# File lib/cocoapods-core/build_type.rb, line 82
def dynamic_framework?
  dynamic? && framework?
end
dynamic_library?() click to toggle source

@return [Boolean] whether the target is built as a dynamic library

# File lib/cocoapods-core/build_type.rb, line 88
def dynamic_library?
  dynamic? && library?
end
framework?() click to toggle source

@return [Boolean] whether the target is built as a framework

# File lib/cocoapods-core/build_type.rb, line 70
def framework?
  packaging == :framework
end
inspect() click to toggle source
# File lib/cocoapods-core/build_type.rb, line 112
def inspect
  "#<#{self.class} linkage=#{linkage} packaging=#{packaging}>"
end
library?() click to toggle source

@return [Boolean] whether the target is built as a library

# File lib/cocoapods-core/build_type.rb, line 76
def library?
  packaging == :library
end
static?() click to toggle source

@return [Boolean] whether the target is built statically

# File lib/cocoapods-core/build_type.rb, line 64
def static?
  linkage == :static
end
static_framework?() click to toggle source

@return [Boolean] whether the target is built as a static framework

# File lib/cocoapods-core/build_type.rb, line 94
def static_framework?
  static? && framework?
end
static_library?() click to toggle source

@return [Boolean] whether the target is built as a static library

# File lib/cocoapods-core/build_type.rb, line 100
def static_library?
  static? && library?
end
to_hash() click to toggle source
# File lib/cocoapods-core/build_type.rb, line 108
def to_hash
  { :linkage => linkage, :packaging => packaging }
end
to_s() click to toggle source
# File lib/cocoapods-core/build_type.rb, line 104
def to_s
  "#{linkage} #{packaging}"
end