Class: Pod::X::Sandbox::Project
- Inherits:
-
Sandbox
- Object
- Sandbox
- Pod::X::Sandbox::Project
- Includes:
- Protocol
- Defined in:
- lib/cocoapods-x/extension/sandbox/project.rb
Instance Attribute Summary collapse
-
#conf ⇒ Object
readonly
Returns the value of attribute conf.
-
#repos ⇒ Object
readonly
Returns the value of attribute repos.
Instance Method Summary collapse
-
#initialize(conf) ⇒ Project
constructor
A new instance of Project.
- #install! ⇒ Object
- #pods_file ⇒ Object
- #project_name ⇒ Object
- #source_file ⇒ Object
- #update! ⇒ Object
Constructor Details
#initialize(conf) ⇒ Project
Returns a new instance of Project.
12 13 14 15 16 |
# File 'lib/cocoapods-x/extension/sandbox/project.rb', line 12 def initialize conf @conf = conf super conf.project_debug_url @repos = Pod::X::Sandbox::Repos::new conf::project_debug_url end |
Instance Attribute Details
#conf ⇒ Object (readonly)
Returns the value of attribute conf.
10 11 12 |
# File 'lib/cocoapods-x/extension/sandbox/project.rb', line 10 def conf @conf end |
#repos ⇒ Object (readonly)
Returns the value of attribute repos.
10 11 12 |
# File 'lib/cocoapods-x/extension/sandbox/project.rb', line 10 def repos @repos end |
Instance Method Details
#install! ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/cocoapods-x/extension/sandbox/project.rb', line 18 def install! @conf.sync @conf.save! unless pods_file.exist? cp! [Pod::X::Sandbox::workspace::template::pods_file, pods_file] end unless source_file.exist? ln! ['-s', Pod::X::Sandbox::workspace::source_file, source_file] end end |
#pods_file ⇒ Object
36 37 38 |
# File 'lib/cocoapods-x/extension/sandbox/project.rb', line 36 def pods_file root + 'pods' end |
#project_name ⇒ Object
44 45 46 |
# File 'lib/cocoapods-x/extension/sandbox/project.rb', line 44 def project_name File.basename(@conf.project_url) end |
#source_file ⇒ Object
40 41 42 |
# File 'lib/cocoapods-x/extension/sandbox/project.rb', line 40 def source_file root + 'sources' end |
#update! ⇒ Object
32 33 34 |
# File 'lib/cocoapods-x/extension/sandbox/project.rb', line 32 def update! install! end |