Class: Pod::Podfile::TargetDefinition

Inherits:
Object
  • Object
show all
Defined in:
lib/cocoapods-xlbuild/helper/podfile_options.rb

Instance Method Summary collapse

Instance Method Details

#parse_prebuild_framework(name, requirements) ⇒ Object

— option for setting using prebuild framework —



13
14
15
16
17
18
19
20
21
22
23
# File 'lib/cocoapods-xlbuild/helper/podfile_options.rb', line 13

def parse_prebuild_framework(name, requirements)
    should_prebuild = Pod::Podfile::DSL.prebuild_all
    options = requirements.last
    if options.is_a?(Hash) && options[Pod::Prebuild.keyword] != nil 
        should_prebuild = options.delete(Pod::Prebuild.keyword)
        requirements.pop if options.empty?
    end
    
    pod_name = Specification.root_name(name)
    set_prebuild_for_pod(pod_name, should_prebuild)
end

#prebuild_framework_pod_namesObject



36
37
38
39
40
41
42
# File 'lib/cocoapods-xlbuild/helper/podfile_options.rb', line 36

def prebuild_framework_pod_names
    names = @prebuild_framework_pod_names || []
    if parent != nil and parent.kind_of? TargetDefinition
        names += parent.prebuild_framework_pod_names
    end
    names
end

#set_prebuild_for_pod(pod_name, should_prebuild) ⇒ Object



25
26
27
28
29
30
31
32
33
34
# File 'lib/cocoapods-xlbuild/helper/podfile_options.rb', line 25

def set_prebuild_for_pod(pod_name, should_prebuild)
    
    if should_prebuild == true
        @prebuild_framework_pod_names ||= []
        @prebuild_framework_pod_names.push pod_name
    else
        @should_not_prebuild_framework_pod_names ||= []
        @should_not_prebuild_framework_pod_names.push pod_name
    end
end

#should_not_prebuild_framework_pod_namesObject



43
44
45
46
47
48
49
# File 'lib/cocoapods-xlbuild/helper/podfile_options.rb', line 43

def should_not_prebuild_framework_pod_names
    names = @should_not_prebuild_framework_pod_names || []
    if parent != nil and parent.kind_of? TargetDefinition
        names += parent.should_not_prebuild_framework_pod_names
    end
    names
end