Class: Fastlane::Helper::Xcspec::Mapping
- Inherits:
-
Object
- Object
- Fastlane::Helper::Xcspec::Mapping
- Defined in:
- lib/fastlane/plugin/xcconfig_actions/helper/xcspec.rb
Overview
Class for managing build flags mapping.
Mapping collapse
-
#flags ⇒ Object
readonly
Main tool flags.
-
#linker_flags ⇒ Object
readonly
Additional linker flags.
Mapping collapse
-
#initialize(flags = "", linker_flags = "") ⇒ Mapping
constructor
Initialize new mapping.
-
#join(other) ⇒ Mapping
Join with other mapping and return new mapping.
Constructor Details
#initialize(flags = "", linker_flags = "") ⇒ Mapping
Initialize new mapping.
27 28 29 30 |
# File 'lib/fastlane/plugin/xcconfig_actions/helper/xcspec.rb', line 27 def initialize(flags = "", linker_flags = "") @flags = flags @linker_flags = linker_flags end |
Instance Attribute Details
#flags ⇒ Object (readonly)
Main tool flags.
19 20 21 |
# File 'lib/fastlane/plugin/xcconfig_actions/helper/xcspec.rb', line 19 def flags @flags end |
#linker_flags ⇒ Object (readonly)
Additional linker flags
22 23 24 |
# File 'lib/fastlane/plugin/xcconfig_actions/helper/xcspec.rb', line 22 def linker_flags @linker_flags end |
Instance Method Details
#join(other) ⇒ Mapping
Join with other mapping and return new mapping.
35 36 37 38 39 40 41 42 |
# 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 |