Sha256: 15618bae847888f332b36fcf38a7cfa91108f567c3a8d1d3224bb5c1e291564c

Contents?: true

Size: 529 Bytes

Versions: 54

Compression:

Stored size: 529 Bytes

Contents

require 'lhj/helper/oss_helper'
require 'terminal-table'

module Lhj
  class Command
    class OSS < Command
      class List < OSS

        def handle
          objects = Lhj::OSS::Helper.instance.list
          rows = []
          objects.each_with_index do |o, i|
            path = "#{i}.#{Lhj::OSS::Helper.instance.url_path}/#{o.key}"
            rows << [path]
          end
          table = Terminal::Table.new title: 'OSS List', headings: ['URL'], rows: rows
          puts table
        end
      end
    end
  end
end

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
lhj-tools-0.1.97 lib/lhj/command/oss/list.rb
lhj-tools-0.1.96 lib/lhj/command/oss/list.rb
lhj-tools-0.1.95 lib/lhj/command/oss/list.rb
lhj-tools-0.1.94 lib/lhj/command/oss/list.rb
lhj-tools-0.1.93 lib/lhj/command/oss/list.rb
lhj-tools-0.1.92 lib/lhj/command/oss/list.rb
lhj-tools-0.1.91 lib/lhj/command/oss/list.rb
lhj-tools-0.1.90 lib/lhj/command/oss/list.rb
lhj-tools-0.1.89 lib/lhj/command/oss/list.rb
lhj-tools-0.1.88 lib/lhj/command/oss/list.rb
lhj-tools-0.1.87 lib/lhj/command/oss/list.rb
lhj-tools-0.1.86 lib/lhj/command/oss/list.rb
lhj-tools-0.1.85 lib/lhj/command/oss/list.rb
lhj-tools-0.1.84 lib/lhj/command/oss/list.rb
lhj-tools-0.1.83 lib/lhj/command/oss/list.rb
lhj-tools-0.1.82 lib/lhj/command/oss/list.rb
lhj-tools-0.1.81 lib/lhj/command/oss/list.rb
lhj-tools-0.1.80 lib/lhj/command/oss/list.rb
lhj-tools-0.1.79 lib/lhj/command/oss/list.rb
lhj-tools-0.1.77 lib/lhj/command/oss/list.rb