Class: Pindo::Command::Gplay::Pullconfig
- Inherits:
-
Pindo::Command::Gplay
- Object
- CLAide::Command
- Pindo::Command
- Pindo::Command::Gplay
- Pindo::Command::Gplay::Pullconfig
- Defined in:
- lib/pindo/command/gplay/pullconfig.rb
Constant Summary
Constants inherited from Pindo::Command
DEFAULT_OPTIONS, DEFAULT_ROOT_OPTIONS
Instance Attribute Summary
Attributes inherited from Pindo::Command
Instance Method Summary collapse
-
#initialize(argv) ⇒ Pullconfig
constructor
A new instance of Pullconfig.
- #run ⇒ Object
- #validate! ⇒ Object
Methods inherited from Pindo::Command
command_name, #initialize_options, options, run, use_cache?
Methods included from Funlog::Mixin
Methods included from Pindoconfig::Mixin
Constructor Details
#initialize(argv) ⇒ Pullconfig
21 22 23 24 25 |
# File 'lib/pindo/command/gplay/pullconfig.rb', line 21 def initialize(argv) @bundle_name = argv.shift_argument super @additional_args = argv.remainder! end |
Instance Method Details
#run ⇒ Object
37 38 39 40 41 42 43 |
# File 'lib/pindo/command/gplay/pullconfig.rb', line 37 def run # 克隆配置仓库(使用继承的方法) app_config_dir = clong_buildconfig_repo(repo_name: @bundle_name) # 返回配置仓库路径 app_config_dir end |
#validate! ⇒ Object
27 28 29 30 31 32 33 34 35 |
# File 'lib/pindo/command/gplay/pullconfig.rb', line 27 def validate! super if @bundle_name.nil? say "You need input a bundle name" @bundle_name = ask('Bundle Name: ') || nil end help! 'You need input a bundle name' if @bundle_name.nil? || @bundle_name.empty? end |