Method: ConverterBase#erase_postscript
- Defined in:
- lib/converterbase.rb
#erase_postscript(data) ⇒ Object
後書きを削除する
1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 |
# File 'lib/converterbase.rb', line 1094 def erase_postscript(data) del_count = 0 data.gsub!(/#{AUTHOR_COMMENT_CHUKI[:postscript][:open]}.+?#{AUTHOR_COMMENT_CHUKI[:postscript][:close]}\n([#改ページ]|\z)/m) do del_count += 1 $1 end if del_count > 0 @inspector.info("後書きをすべて削除しました。削除した数は#{del_count}個です。") end end |