Skip to content
Browse files

[Docs] Platform#support?

  • Loading branch information...
1 parent d0ebef6 commit 71d754c499c4875bdd7985521df985d1bb48abf4 @fabiopelosin fabiopelosin committed Jun 9, 2012
Showing with 5 additions and 9 deletions.
  1. +5 −9 lib/cocoapods/platform.rb
View
14 lib/cocoapods/platform.rb
@@ -103,22 +103,18 @@ def ==(other)
end
end
- # A platform supports (from the point of view of a pod) another platform
- # if they represent the same SDK and if the deployment target of the other
- # is lower. If one of the platforms does not specify the deployment target,
- # it is not taken into account.
+ # In the context of operating system SDKs, a platform supports another
+ # one if they have the same name and the other platform has a minor or
+ # equal deployment target.
#
# @note This method returns true if one of the platforms is nil.
#
- # @return Whether the platform supports being used in the environment
- # described by another platform.
- #
- # @todo rename to supported_on?
+ # @return Whether the platform supports another platform.
#
def supports?(other)
return true if @symbolic_name.nil? || other.nil?
other = Platform.new(other)
- (name == other.name) && (deployment_target >= other.deployment_target)
+ (other.name == name) && (other.deployment_target <= deployment_target)
end
# @return [String] A string representation including the deployment target.

0 comments on commit 71d754c

Please sign in to comment.
Something went wrong with that request. Please try again.