Class: Pod::Command::Bin::Imy

Inherits:
Pod::Command::Bin show all
Defined in:
lib/cocoapods-bb-bin/command/bin/imy.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Pod::Command::Bin

#validate!

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, #valid_sources

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

.optionsObject



17
18
19
20
# File 'lib/cocoapods-bb-bin/command/bin/imy.rb', line 17

def self.options
  [
  ].concat(super)
end

Instance Method Details

#runObject



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