class Fastlane::Helper::Xcspec::Mapping

Class for managing build flags mapping.

Attributes

flags[R]

Main tool flags.

linker_flags[R]

Additional linker flags

Public Class Methods

new(flags = "", linker_flags = "") click to toggle source

Initialize new mapping. @param [String] flags Main tool flags. @param [String] linker_flags Additional linker flags.

# File lib/fastlane/plugin/xcconfig_actions/helper/xcspec.rb, line 27
def initialize(flags = "", linker_flags = "")
  @flags = flags
  @linker_flags = linker_flags
end

Public Instance Methods

join(other) click to toggle source

Join with other mapping and return new mapping. @param [Mapping] other Other mapping to join with. @return [Mapping] New joined mapping.

# File lib/fastlane/plugin/xcconfig_actions/helper/xcspec.rb, line 35
def join(other)
  return self if other.nil?

  joined_flags = [flags, other.flags].reject(&:empty?).join(" ")
  joined_linker_flags = [linker_flags, other.linker_flags].reject(&:empty?).join(" ")

  Mapping.new(joined_flags, joined_linker_flags)
end