Class: Pod::Command::Bin::Imy
- Inherits:
-
Pod::Command::Bin
- Object
- Pod::Command
- Pod::Command::Bin
- Pod::Command::Bin::Imy
- Defined in:
- lib/cocoapods-bb-bin/command/bin/imy.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(argv) ⇒ Imy
constructor
A new instance of Imy.
- #run ⇒ Object
Methods inherited from Pod::Command::Bin
Methods included from CBin::SpecFilesHelper
#binary_spec, #binary_spec_files, #binary_template_spec, #binary_template_spec_file, #binary_template_spec_files, #clear_binary_spec_file_if_needed, #code_spec, #code_spec_files, #create_binary_spec_file, #find_spec_file, #spec_files
Methods included from CBin::SourcesHelper
#binary_source, #code_source, #sources_manager, #sources_option, #sources_optionV2, #valid_sources, #valid_sourcesV2
Constructor Details
#initialize(argv) ⇒ Imy
Returns a new instance of Imy.
22 23 24 25 |
# File 'lib/cocoapods-bb-bin/command/bin/imy.rb', line 22 def initialize(argv) @hot_key = argv.shift_argument || '1' super end |
Class Method Details
.options ⇒ Object
17 18 19 20 |
# File 'lib/cocoapods-bb-bin/command/bin/imy.rb', line 17 def self. [ ].concat(super) end |
Instance Method Details
#run ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/cocoapods-bb-bin/command/bin/imy.rb', line 27 def run CBin.config_hot_key.set_hot_key_index(@hot_key) UI.puts "cd #{CBin.config_hot_key.hot_key_dir}".yellow if Dir.exist?(CBin.config_hot_key.hot_key_dir) Dir.chdir(CBin.config_hot_key.hot_key_dir) do UI.puts " #{CBin.config_hot_key.hot_key_cmd}".yellow system CBin.config_hot_key.hot_key_cmd end else raise "配置项中文件目录不存在 #{CBin.config_hot_key.hot_key_dir}" end end |