Class: Pod::Extension::Sandbox::Template

Inherits:
Sandbox
  • Object
show all
Includes:
Protocol
Defined in:
lib/cocoapods-extension/sandbox/template.rb

Instance Method Summary collapse

Constructor Details

#initialize(url) ⇒ Template

Returns a new instance of Template.



10
11
12
# File 'lib/cocoapods-extension/sandbox/template.rb', line 10

def initialize url
    super File.join(url, '.template')
end

Instance Method Details

#configureObject



37
38
39
# File 'lib/cocoapods-extension/sandbox/template.rb', line 37

def configure
    root + 'configure'
end

#install!Object



14
15
16
17
18
# File 'lib/cocoapods-extension/sandbox/template.rb', line 14

def install!
    unless verify_files
        update!
    end
end

#ios_templateObject



33
34
35
# File 'lib/cocoapods-extension/sandbox/template.rb', line 33

def ios_template
    root + 'Projects/ios'
end

#pod_fileObject



29
30
31
# File 'lib/cocoapods-extension/sandbox/template.rb', line 29

def pod_file
    root + 'Projects/podfile/pods'
end

#source_fileObject



25
26
27
# File 'lib/cocoapods-extension/sandbox/template.rb', line 25

def source_file
    root + 'Projects/podfile/source'
end

#update!Object



20
21
22
23
# File 'lib/cocoapods-extension/sandbox/template.rb', line 20

def update!
    rm! ['-rf', root]
    clone_template! root
end