Commit 71d754c4 authored by Fabio Pelosin's avatar Fabio Pelosin

[Docs] Platform#support?

parent d0ebef6a
...@@ -103,22 +103,18 @@ module Pod ...@@ -103,22 +103,18 @@ module Pod
end end
end end
# A platform supports (from the point of view of a pod) another platform # In the context of operating system SDKs, a platform supports another
# if they represent the same SDK and if the deployment target of the other # one if they have the same name and the other platform has a minor or
# is lower. If one of the platforms does not specify the deployment target, # equal deployment target.
# it is not taken into account.
# #
# @note This method returns true if one of the platforms is nil. # @note This method returns true if one of the platforms is nil.
# #
# @return Whether the platform supports being used in the environment # @return Whether the platform supports another platform.
# described by another platform.
#
# @todo rename to supported_on?
# #
def supports?(other) def supports?(other)
return true if @symbolic_name.nil? || other.nil? return true if @symbolic_name.nil? || other.nil?
other = Platform.new(other) other = Platform.new(other)
(name == other.name) && (deployment_target >= other.deployment_target) (other.name == name) && (other.deployment_target <= deployment_target)
end end
# @return [String] A string representation including the deployment target. # @return [String] A string representation including the deployment target.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment