Sha256: 0805e8ae03cabc032699a98e9daed96bad418b0b07a24cd192953e63d382cf45

Contents?: true

Size: 536 Bytes

Versions: 3

Compression:

Stored size: 536 Bytes

Contents

# frozen_string_literal: true

require 'terminal-table'
require 'middleware-cli/app'

module MiddlewareCli
  class List
    extend App
    class << self
      def display
        table = Terminal::Table.new do |t|
          t << ['S/n', 'Middleware Name']
          t << :separator
          middleware_list do |middleware, index|
            t.add_row [index , middleware]
          end
          t << :separator
          t << ['Total', "#{filtered_list.count} Middlewares"]
        end
        puts table
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
middleware-cli-1.1.0 lib/middleware-cli/list.rb
middleware-cli-1.0.0 lib/middleware-cli/list.rb
middleware-cli-0.1.0 lib/middleware-cli/list.rb