Class: LgPodPlugin::Command::Install
- Inherits:
-
LgPodPlugin::Command
- Object
- CLAide::Command
- LgPodPlugin::Command
- LgPodPlugin::Command::Install
- Defined in:
- lib/command/install.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(argv) ⇒ Install
constructor
A new instance of Install.
- #run ⇒ Object
Methods inherited from LgPodPlugin::Command
Constructor Details
#initialize(argv) ⇒ Install
Returns a new instance of Install.
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/command/install.rb', line 41 def initialize(argv) self.log = argv.flag?('verbose') repo_flag = argv.flag?('repo-update') if repo_flag.nil? self.repo_update = true else self.repo_update = repo_flag end if argv.flag?('clean-install').nil? @clean_install = false else @clean_install = true end super end |
Class Method Details
.options ⇒ Object
32 33 34 35 36 37 38 39 |
# File 'lib/command/install.rb', line 32 def self. [ ['--repo-update', 'Force running `pod repo update` before install'], ['--deployment', 'Disallow any changes to the Podfile or the Podfile.lock during installation'], ['--clean-install', 'Ignore the contents of the project cache and force a full pod installation. This only ' \ 'applies to projects that have enabled incremental installation'], ].concat(super).reject { |(name, _)| name == '--no-repo-update' } end |
Instance Method Details
#run ⇒ Object
57 58 59 60 61 62 63 |
# File 'lib/command/install.rb', line 57 def run begin_time = Time.now.to_i LgPodPlugin::Main.run("install", { :verbose => self.log, :repo_update => self.repo_update, :clean_install => self.clean_install }) end_time = Time.now.to_i LgPodPlugin.log_blue "`lg install`安装所需时间: #{end_time - begin_time}" end |