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

Methods included from TraceHelper

#ui

Instance Method Details



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

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
26
27
# File 'lib/inch/cli/command/output/base.rb', line 21

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