Class: Inch::CLI::Command::Output::Base Abstract

Inherits:
Object
  • Object
show all
Includes:
TraceHelper
Defined in:
lib/inch/cli/command/output/base.rb

Overview

This class is abstract.

Abstract base class for CLI output

Direct Known Subclasses

Console, Diff, Inspect, List, Show, Stats, Suggest

Instance Method Summary collapse

Instance Method Details


27
28
29
30
31
32
# File 'lib/inch/cli/command/output/base.rb', line 27

def print_file_info(o, color)
  o.files.each do |f|
    echo "-> #{f.filename}:#{f.line_no}".color(color)
  end
  echo separator
end

#priority_arrow(priority, color = :white) ⇒ Object


21
22
23
24
25
# File 'lib/inch/cli/command/output/base.rb', line 21

def priority_arrow(priority, color = :white)
  Evaluation::PriorityRange.all.each do |range|
    return range.arrow.color(color).dark if range.include?(priority)
  end
end

#uiObject

this is used to use Inch::Utils::BufferedIO


35
36
37
# File 'lib/inch/cli/command/output/base.rb', line 35

def ui
  @options.ui
end