Skip to content

Commit

Permalink
[LocalPod] Store the platform.
Browse files Browse the repository at this point in the history
The specification class only stores the active platform symbol.
  • Loading branch information
fabiopelosin committed Jun 25, 2012
1 parent 5334e67 commit 405a41d
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions lib/cocoapods/local_pod.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ class LocalPod
# #
attr_reader :sandbox attr_reader :sandbox


# @return [Platform] The platform that will be used to build the pod.
#
attr_reader :platform

# @param [Specification] specification # @param [Specification] specification
# The first activated specification of the pod. # The first activated specification of the pod.
# @param [Sandbox] sandbox # @param [Sandbox] sandbox
Expand All @@ -46,7 +50,7 @@ class LocalPod
# computed values. In other words, it should be immutable. # computed values. In other words, it should be immutable.
# #
def initialize(specification, sandbox, platform) def initialize(specification, sandbox, platform)
@top_specification, @sandbox = specification.top_level_parent, sandbox @top_specification, @sandbox, @platform = specification.top_level_parent, sandbox, platform
@top_specification.activate_platform(platform) @top_specification.activate_platform(platform)
@specifications = [] << specification @specifications = [] << specification
end end
Expand Down Expand Up @@ -96,12 +100,6 @@ def name
top_specification.name top_specification.name
end end


# @return [Platform] The platform that will be used to build the pod.
#
def platform
top_specification.active_platform
end

# @!group Installation # @!group Installation


# Creates the root path of the pod. # Creates the root path of the pod.
Expand Down

0 comments on commit 405a41d

Please sign in to comment.