Class: Pod::Command::Bin::Init

Inherits:
Pod::Command::Bin show all
Defined in:
lib/cocoapods-imy-bin/command/bin/init.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) ⇒ Init

Returns a new instance of Init.



19
20
21
22
# File 'lib/cocoapods-imy-bin/command/bin/init.rb', line 19

def initialize(argv)
  @bin_url = argv.option('bin-url')
  super
end

Class Method Details

.optionsObject



13
14
15
16
17
# File 'lib/cocoapods-imy-bin/command/bin/init.rb', line 13

def self.options
  [
    ['--bin-url=URL', '配置文件地址,直接从此地址下载配置文件']
  ].concat(super)
end

Instance Method Details

#runObject



24
25
26
27
28
29
30
# File 'lib/cocoapods-imy-bin/command/bin/init.rb', line 24

def run
  if @bin_url.nil?
    config_with_asker
  else
    config_with_url(@bin_url)
  end
end