Class: Pod::Specification

Inherits:
Object
  • Object
show all
Defined in:
lib/cocoapods-kz/native/specification.rb

Instance Method Summary collapse

Instance Method Details

#deployment_target(platform_name) ⇒ Object



5
6
7
8
9
10
# File 'lib/cocoapods-kz/native/specification.rb', line 5

def deployment_target(platform_name)
  result = platform_hash[platform_name.to_s]
  result ||= parent.deployment_target(platform_name) if parent
  result = "9.0" if platform_name == "ios" && (result == nil || result.to_f < 9.0)
  result
end

#platform_hashObject



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/cocoapods-kz/native/specification.rb', line 12

def platform_hash
  case value = attributes_hash['platforms']
  when String
    { value => nil }
  when Array
    result = {}
    value.each do |a_value|
      result[a_value] = nil
    end
    result
  when Hash
    ios = value["ios"]
    value["ios"] = 9.0 if ios == nil || ios.to_f < 9.0
    value
  else
    {}
  end
end