Method: NovelConverter#inspect_novel

Defined in:
lib/novelconverter.rb

#inspect_novel(array_of_text) ⇒ Object



730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
# File 'lib/novelconverter.rb', line 730

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

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

  @inspector.save
end