Sha256: 62034e82cf0825fde1dfa2a687173a43a103b5b33f21d8d8d4e60bcfa916e914

Contents?: true

Size: 657 Bytes

Versions: 4

Compression:

Stored size: 657 Bytes

Contents

# frozen_string_literal: true
require 'lhj/helper/oss_helper'

module Lhj
  class Command
    class OSS < Command
      class Del < OSS
        self.summary = '删除OSS的key'

        self.arguments = [
          CLAide::Argument.new('--key=XX', true)
        ]

        def self.options
          [
            %w[--key OSS对应的key]
          ]
        end

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

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

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
lhj-tools-0.1.5 lib/lhj/command/oss/del.rb
lhj-tools-0.1.4 lib/lhj/command/oss/del.rb
lhj-tools-0.1.3 lib/lhj/command/oss/del.rb
lhj-tools-0.1.2 lib/lhj/command/oss/del.rb