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.76 lib/lhj/command/oss/list.rb
lhj-tools-0.1.75 lib/lhj/command/oss/list.rb
lhj-tools-0.1.74 lib/lhj/command/oss/list.rb
lhj-tools-0.1.73 lib/lhj/command/oss/list.rb
lhj-tools-0.1.72 lib/lhj/command/oss/list.rb
lhj-tools-0.1.71 lib/lhj/command/oss/list.rb
lhj-tools-0.1.70 lib/lhj/command/oss/list.rb
lhj-tools-0.1.69 lib/lhj/command/oss/list.rb
lhj-tools-0.1.67 lib/lhj/command/oss/list.rb
lhj-tools-0.1.66 lib/lhj/command/oss/list.rb
lhj-tools-0.1.65 lib/lhj/command/oss/list.rb
lhj-tools-0.1.64 lib/lhj/command/oss/list.rb
lhj-tools-0.1.63 lib/lhj/command/oss/list.rb
lhj-tools-0.1.62 lib/lhj/command/oss/list.rb
lhj-tools-0.1.61 lib/lhj/command/oss/list.rb
lhj-tools-0.1.60 lib/lhj/command/oss/list.rb
lhj-tools-0.1.59 lib/lhj/command/oss/list.rb
lhj-tools-0.1.57 lib/lhj/command/oss/list.rb
lhj-tools-0.1.56 lib/lhj/command/oss/list.rb
lhj-tools-0.1.55 lib/lhj/command/oss/list.rb