Class: Pod::Extension::Sandbox::Project

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(conf) ⇒ Project

Returns a new instance of Project.



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

def initialize conf
    @conf = conf
    super conf.project_debug_url
    @repos = Pod::Extension::Sandbox::Repos::new conf::project_debug_url
end

Instance Attribute Details

#confObject (readonly)

Returns the value of attribute conf.



11
12
13
# File 'lib/cocoapods-extension/sandbox/project.rb', line 11

def conf
  @conf
end

#reposObject (readonly)

Returns the value of attribute repos.



11
12
13
# File 'lib/cocoapods-extension/sandbox/project.rb', line 11

def repos
  @repos
end

Instance Method Details

#install!Object



19
20
21
22
23
24
25
26
# File 'lib/cocoapods-extension/sandbox/project.rb', line 19

def install!
    @conf.sync
    @conf.save!

    unless pod_file.exist?
        cp! [Pod::Extension::Sandbox::workspace::template::pod_file, pod_file]
    end
end

#pod_fileObject



32
33
34
# File 'lib/cocoapods-extension/sandbox/project.rb', line 32

def pod_file
    root + 'pods'
end

#update!Object



28
29
30
# File 'lib/cocoapods-extension/sandbox/project.rb', line 28

def update!
    install!
end