Method: Command::List::NovelDecorator#decorate_title

Defined in:
lib/command/list/novel_decorator.rb

#decorate_titleObject



58
59
60
61
62
63
64
65
66
67
68
69
70
# File 'lib/command/list/novel_decorator.rb', line 58

def decorate_title
  if !options["kind"] && novel_type == 2
    type = " <bold><black>(#{NOVEL_TYPE_LABEL[novel_type]})</black></bold>"
  end
  the_end = "<bold><black>(完結)</black></bold>" if tags.include?("end")
  delete = "<bold><black>(削除)</black></bold>" if tags.include?("404")
  [
    novel["title"].escape,
    type,
    the_end,
    delete
  ].compact.join(" ")
end