Class: Pod::Command::Bin::OSS::Del

Inherits:
Pod::Command::Bin::OSS show all
Defined in:
lib/cocoapods-lhj-bin/command/bin/oss/del.rb

Class Method Summary collapse

Instance Method Summary collapse

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) ⇒ Del

Returns a new instance of Del.

[View source]

21
22
23
24
# File 'lib/cocoapods-lhj-bin/command/bin/oss/del.rb', line 21

def initialize(argv)
  @key = argv.option('key')
  super
end

Class Method Details

.optionsObject

[View source]

15
16
17
18
19
# File 'lib/cocoapods-lhj-bin/command/bin/oss/del.rb', line 15

def self.options
  [
    ['--key', 'OSS对应的key']
  ]
end

Instance Method Details

#runObject

[View source]

31
32
33
# File 'lib/cocoapods-lhj-bin/command/bin/oss/del.rb', line 31

def run
  CBin::OSS::Helper.instance.delete(@key)
end

#validate!Object

[View source]

26
27
28
29
# File 'lib/cocoapods-lhj-bin/command/bin/oss/del.rb', line 26

def validate!
  help! '请输入key' unless @key
  super
end