Class: Inch::CLI::Command::Output::Base
- Inherits:
-
Object
- Object
- Inch::CLI::Command::Output::Base
- Includes:
- TraceHelper
- Defined in:
- lib/inch/cli/command/output/base.rb
Overview
Abstract base class for CLI output
Constant Summary collapse
- PRIORITY_MAP =
{ (4..99) => "\u2191", # north (2...4) => "\u2197", # north-east (0..1) => "\u2192", # east (-2..-1) => "\u2198", # south-east (-99..-3) => "\u2193", # south-east }
- PRIORITY_ARROWS =
PRIORITY_MAP.values
Instance Method Summary collapse
Methods included from TraceHelper
Instance Method Details
#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) PRIORITY_MAP.each do |range, str| if range.include?(priority) return str.color(color).dark end end end |