Class: Pod::Command::Swordfish::Config

Inherits:
Pod::Command::Swordfish show all
Defined in:
lib/swordfish/command/config.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Pod::Command::Swordfish

#validate!

Methods included from Ocean::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 Ocean::SourcesHelper

#binary_source, #code_source, #sources_manager, #sources_option, #valid_sources

Constructor Details

#initialize(argv) ⇒ Config

Returns a new instance of Config.



20
21
22
23
# File 'lib/swordfish/command/config.rb', line 20

def initialize(argv)
  @config_url = argv.option('config-url')
  super
end

Class Method Details

.optionsObject



14
15
16
17
18
# File 'lib/swordfish/command/config.rb', line 14

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

Instance Method Details

#runObject



25
26
27
28
29
30
31
# File 'lib/swordfish/command/config.rb', line 25

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