Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cocoapods
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
cocoapods
Commits
e57559d7
Unverified
Commit
e57559d7
authored
Mar 08, 2018
by
Dimitris Koutsogiorgas
Committed by
GitHub
Mar 08, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7489 from dnkoutso/immutability_wins
Make PodVariant and PodVariantSet immutable
parents
ec2073bf
340549bc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
pod_variant.rb
lib/cocoapods/installer/analyzer/pod_variant.rb
+8
-8
pod_variant_set.rb
lib/cocoapods/installer/analyzer/pod_variant_set.rb
+3
-3
No files found.
lib/cocoapods/installer/analyzer/pod_variant.rb
View file @
e57559d7
...
...
@@ -5,19 +5,19 @@ module Pod
class
PodVariant
# @return [Array<Specification>] the spec and subspecs for the target
#
attr_
accesso
r
:specs
attr_
reade
r
:specs
# @return [Array<Specification>] the test specs for the target
#
attr_
accesso
r
:test_specs
attr_
reade
r
:test_specs
# @return [Platform] the platform
#
attr_
accesso
r
:platform
attr_
reade
r
:platform
# @return [Bool] whether this pod should be built as framework
#
attr_
accesso
r
:requires_frameworks
attr_
reade
r
:requires_frameworks
alias_method
:requires_frameworks?
,
:requires_frameworks
# @return [Specification] the root specification
...
...
@@ -34,10 +34,10 @@ module Pod
# @param [Bool] requires_frameworks @see #requires_frameworks?
#
def
initialize
(
specs
,
test_specs
,
platform
,
requires_frameworks
=
false
)
self
.
specs
=
specs
self
.
test_specs
=
test_specs
self
.
platform
=
platform
self
.
requires_frameworks
=
requires_frameworks
@
specs
=
specs
@
test_specs
=
test_specs
@
platform
=
platform
@
requires_frameworks
=
requires_frameworks
end
# @note Test specs are intentionally not included as part of the equality for pod variants since a
...
...
lib/cocoapods/installer/analyzer/pod_variant_set.rb
View file @
e57559d7
...
...
@@ -5,16 +5,16 @@ module Pod
class
Analyzer
# Collects all {PodVariant}.
class
PodVariantSet
# @return [Array<PodVariant>] the different variants.
# @return [Array<PodVariant>] the different variants
within this set
.
#
attr_
accesso
r
:variants
attr_
reade
r
:variants
# Initialize a new instance.
#
# @param [Array<PodVariant>] variants @see #variants
#
def
initialize
(
variants
)
self
.
variants
=
variants
@
variants
=
variants
end
# Describes what makes each {PodVariant} distinct among the others.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment