Method: NovelConverter#inspect_novel

Defined in:
lib/novelconverter.rb

#inspect_novel(text) ⇒ Object



346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
# File 'lib/novelconverter.rb', line 346

def inspect_novel(text)
  # 行末読点の現在状況を調査する
  @inspector.inspect_end_touten_conditions(text)
  @inspector.countup_return_in_brackets(text)

  if !@display_inspector
    unless @inspector.empty?
      puts "小説状態の調査結果を #{Inspector::INSPECT_LOG_NAME} に出力しました"
    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