Class: Calrom::Highlighter::Overview

Inherits:
List
  • Object
show all
Defined in:
lib/calrom/highlighter/overview.rb

Constant Summary

Constants inherited from List

List::COLOUR_OVERRIDE

Instance Method Summary collapse

Methods inherited from List

#colour, #today

Instance Method Details

#rank(text, rank) ⇒ Object



4
5
6
7
8
9
10
11
12
# File 'lib/calrom/highlighter/overview.rb', line 4

def rank(text, rank)
  if rank.solemnity?
    ColorizedString.new(text).colorize(mode: :bold)
  elsif rank.feast?
    ColorizedString.new(text).colorize(mode: :underline)
  else
    text
  end
end