class Samovar::Output::UsageFormatter
Public Class Methods
Source
# File vendor/bundle/ruby/3.4.0/gems/samovar-2.3.0/lib/samovar/output/usage_formatter.rb, line 27 def initialize(rows, output) @rows = rows @output = output @width = 80 @terminal = Console::Terminal.for(@output) @terminal[:header] = @terminal.style(nil, nil, :bright) @terminal[:description] = @terminal.style(:blue) @terminal[:error] = @terminal.style(:red) end
Source
# File vendor/bundle/ruby/3.4.0/gems/samovar-2.3.0/lib/samovar/output/usage_formatter.rb, line 19 def self.print(rows, output) formatter = self.new(rows, output) yield formatter if block_given? formatter.print end
Public Instance Methods
Source
# File vendor/bundle/ruby/3.4.0/gems/samovar-2.3.0/lib/samovar/output/usage_formatter.rb, line 67 def print map(@rows) end