Class: KCommercial::KCPipeline::Command::GitHookInstall
- Inherits:
-
KCommercial::KCPipeline::Command
- Object
- CLAide::Command
- KCommercial::KCPipeline::Command
- KCommercial::KCPipeline::Command::GitHookInstall
- Defined in:
- lib/KCommercialPipeline/command/git_hook_install_cmd.rb
Instance Attribute Summary collapse
-
#platform ⇒ Object
readonly
Returns the value of attribute platform.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(argv) ⇒ GitHookInstall
constructor
A new instance of GitHookInstall.
- #run ⇒ Object
Methods inherited from KCommercial::KCPipeline::Command
Constructor Details
#initialize(argv) ⇒ GitHookInstall
Returns a new instance of GitHookInstall.
12 13 14 15 |
# File 'lib/KCommercialPipeline/command/git_hook_install_cmd.rb', line 12 def initialize(argv) @platform = argv.option('platform') || "iOS" super end |
Instance Attribute Details
#platform ⇒ Object (readonly)
Returns the value of attribute platform.
7 8 9 |
# File 'lib/KCommercialPipeline/command/git_hook_install_cmd.rb', line 7 def platform @platform end |
Class Method Details
.options ⇒ Object
17 18 19 20 21 |
# File 'lib/KCommercialPipeline/command/git_hook_install_cmd.rb', line 17 def self. [ ['--platform', "填iOS or Android,根据平台安装两端githook"] ].concat(super ) end |
Instance Method Details
#run ⇒ Object
23 24 25 |
# File 'lib/KCommercialPipeline/command/git_hook_install_cmd.rb', line 23 def run InstallGitHook.new(@platform).install! end |