Method: NovelConverter#inspect_novel

Defined in:
lib/novelconverter.rb

#inspect_novel(text) ⇒ Object



682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
# File 'lib/novelconverter.rb', line 682

def inspect_novel(text)
  if @setting.enable_inspect
    @inspector.inspect_end_touten_conditions(text)   # 行末読点の現在状況を調査する
    @inspector.countup_return_in_brackets(text)      # カギ括弧内の改行状況を調査する
  end

  if !@display_inspector
    unless @inspector.empty?
      @inspector.display_summary
    end
  else
    # 小説の監視・検査状況を表示する
    if @inspector.error? || @inspector.warning?
      puts "<bold><yellow>―――― 小説にエラーもしくは警告が存在します ――――</yellow></bold>".termcolor
      puts ""
      @inspector.display(Inspector::ERROR | Inspector::WARNING)
      puts ""
    end
    if @inspector.info?
      puts "<bold><yellow>―――― 小説の検査状況を表示します ――――</yellow></bold>".termcolor
      puts ""
      @inspector.display(Inspector::INFO)
      puts ""
    end
  end

  @inspector.save
end