Class: Pod::PrebuildSandbox

Inherits:
Sandbox
  • Object
show all
Defined in:
lib/cocoapods-binary/helper/prebuild_sandbox.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_standard_sanbox_path(path) ⇒ Object

String

standard_sandbox_path



5
6
7
8
# File 'lib/cocoapods-binary/helper/prebuild_sandbox.rb', line 5

def self.from_standard_sanbox_path(path)
    prebuild_sandbox_path = Pathname.new(path).realpath + "_Prebuild"
    self.new(prebuild_sandbox_path)
end

.from_standard_sandbox(sandbox) ⇒ Object



10
11
12
# File 'lib/cocoapods-binary/helper/prebuild_sandbox.rb', line 10

def self.from_standard_sandbox(sandbox)
    self.from_standard_sanbox_path(sandbox.root)
end

Instance Method Details

#exsited_framework_namesObject



26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/cocoapods-binary/helper/prebuild_sandbox.rb', line 26

def exsited_framework_names
    return [] unless generate_framework_path.exist?
    generate_framework_path.children().map do |framework_name|
        if framework_name.directory?
            if not framework_name.children.empty?
                File.basename(framework_name)
            else
                nil
            end
        else
            nil
        end
    end.reject(&:nil?)
end

#framework_existed?(root_name) ⇒ Boolean

Returns:

  • (Boolean)


41
42
43
44
45
46
# File 'lib/cocoapods-binary/helper/prebuild_sandbox.rb', line 41

def framework_existed?(root_name)
    return false unless generate_framework_path.exist?
    generate_framework_path.children().any? do |child|
        child.basename.to_s == root_name
    end
end

#framework_folder_path_for_pod_name(name) ⇒ Object



22
23
24
# File 'lib/cocoapods-binary/helper/prebuild_sandbox.rb', line 22

def framework_folder_path_for_pod_name(name)
    self.generate_framework_path + name
end

#generate_framework_pathObject



18
19
20
# File 'lib/cocoapods-binary/helper/prebuild_sandbox.rb', line 18

def generate_framework_path
    self.root + "GeneratedFrameworks"
end

#standard_sanbox_pathObject



14
15
16
# File 'lib/cocoapods-binary/helper/prebuild_sandbox.rb', line 14

def standard_sanbox_path
    self.root.parent
end