module Ribose::CLI::Util

Public Class Methods

list(headings:, rows:) click to toggle source
# File lib/ribose/cli/util.rb, line 6
def self.list(headings:, rows:)
  Terminal::Table.new do |table|
    table.headings = headings
    table.rows = rows
  end
end
truncate(content, length = 50) click to toggle source
# File lib/ribose/cli/util.rb, line 13
def self.truncate(content, length = 50)
  if content && content.length > length
    content = content[0..length] + "..."
  end

  content
end