class Pod::BuildType
Constants
- KNOWN_LINKAGE_OPTIONS
@return [Array<Symbol>] known linking options.
- KNOWN_PACKAGING_OPTIONS
@return [Array<Symbol>] known packaging options.
Attributes
@return [Symbol] the linkage for this build type, one of KNOWN_LINKAGE_OPTIONS
@return [Symbol] the packaging for this build type, one of KNOWN_PACKAGING_OPTIONS
Public Class Methods
@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
@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
# 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
@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
@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
# File lib/cocoapods-core/build_type.rb, line 116 def ==(other) linkage == other.linkage && packaging == other.packaging end
@return [Boolean] whether the target is built dynamically
# File lib/cocoapods-core/build_type.rb, line 58 def dynamic? linkage == :dynamic end
@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
@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
@return [Boolean] whether the target is built as a framework
# File lib/cocoapods-core/build_type.rb, line 70 def framework? packaging == :framework end
# File lib/cocoapods-core/build_type.rb, line 112 def inspect "#<#{self.class} linkage=#{linkage} packaging=#{packaging}>" end
@return [Boolean] whether the target is built as a library
# File lib/cocoapods-core/build_type.rb, line 76 def library? packaging == :library end
@return [Boolean] whether the target is built statically
# File lib/cocoapods-core/build_type.rb, line 64 def static? linkage == :static end
@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
@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
# File lib/cocoapods-core/build_type.rb, line 108 def to_hash { :linkage => linkage, :packaging => packaging } end
# File lib/cocoapods-core/build_type.rb, line 104 def to_s "#{linkage} #{packaging}" end