Class: LgPodPlugin::LProject
- Inherits:
-
Object
- Object
- LgPodPlugin::LProject
- Includes:
- Singleton
- Defined in:
- lib/lg_pod_plugin/installer/project.rb
Instance Attribute Summary collapse
-
#cache_specs ⇒ Object
Returns the value of attribute cache_specs.
-
#external_pods ⇒ Object
readonly
Returns the value of attribute external_pods.
-
#lockfile ⇒ Object
readonly
Returns the value of attribute lockfile.
-
#need_update_pods ⇒ Object
readonly
Returns the value of attribute need_update_pods.
-
#podfile ⇒ Object
readonly
Returns the value of attribute podfile.
-
#repo_update ⇒ Object
readonly
Returns the value of attribute repo_update.
-
#targets ⇒ Object
readonly
Returns the value of attribute targets.
-
#update ⇒ Object
readonly
Returns the value of attribute update.
-
#workspace ⇒ Object
readonly
Returns the value of attribute workspace.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#cache_specs ⇒ Object
Returns the value of attribute cache_specs.
18 19 20 |
# File 'lib/lg_pod_plugin/installer/project.rb', line 18 def cache_specs @cache_specs end |
#external_pods ⇒ Object (readonly)
Returns the value of attribute external_pods.
16 17 18 |
# File 'lib/lg_pod_plugin/installer/project.rb', line 16 def external_pods @external_pods end |
#lockfile ⇒ Object (readonly)
Returns the value of attribute lockfile.
11 12 13 |
# File 'lib/lg_pod_plugin/installer/project.rb', line 11 def lockfile @lockfile end |
#need_update_pods ⇒ Object (readonly)
Returns the value of attribute need_update_pods.
17 18 19 |
# File 'lib/lg_pod_plugin/installer/project.rb', line 17 def need_update_pods @need_update_pods end |
#podfile ⇒ Object (readonly)
Returns the value of attribute podfile.
10 11 12 |
# File 'lib/lg_pod_plugin/installer/project.rb', line 10 def podfile @podfile end |
#repo_update ⇒ Object (readonly)
Returns the value of attribute repo_update.
15 16 17 |
# File 'lib/lg_pod_plugin/installer/project.rb', line 15 def repo_update @repo_update end |
#targets ⇒ Object (readonly)
Returns the value of attribute targets.
13 14 15 |
# File 'lib/lg_pod_plugin/installer/project.rb', line 13 def targets @targets end |
#update ⇒ Object (readonly)
Returns the value of attribute update.
12 13 14 |
# File 'lib/lg_pod_plugin/installer/project.rb', line 12 def update @update end |
#workspace ⇒ Object (readonly)
Returns the value of attribute workspace.
14 15 16 |
# File 'lib/lg_pod_plugin/installer/project.rb', line 14 def workspace @workspace end |
Class Method Details
.shared ⇒ Object
41 42 43 |
# File 'lib/lg_pod_plugin/installer/project.rb', line 41 def self.shared return LProject.instance end |
Instance Method Details
#setup(workspace, podfile_path, update, repo_update) ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/lg_pod_plugin/installer/project.rb', line 19 def setup(workspace,podfile_path, update, repo_update) @podfile = Pod::Podfile.from_file(podfile_path) @update = update @workspace = workspace @repo_update = repo_update lockfile_path = workspace.join("Podfile.lock") @lockfile = Pod::Lockfile.from_file(lockfile_path) if lockfile_path.exist? target = @podfile.send(:current_target_definition) children = target.children @targets = Array.new external_pods = Hash.new children.each do |s| target = LPodTarget.new(s) external_pods.merge!(target.dependencies) @targets.append(target) end @cache_specs = Hash.new @external_pods = Hash.new.merge!(external_pods) @need_update_pods = Hash.new.merge!(external_pods) self end |