Module: NanDoc::TaskCommon

Included in:
Cri::Base, CliCommandHelpers, CreateNanDocSite, DataSource, PathHelper
Defined in:
lib/nandoc/support-modules.rb

Instance Method Summary collapse

Instance Method Details

#task_abort(msg) ⇒ Object



252
253
254
255
256
257
258
259
260
261
262
# File 'lib/nandoc/support-modules.rb', line 252

def task_abort msg
  if msg.index("for more info") # not mr. right, mr. right now
    tail = ''
  else
    last = msg[-1].chr
    tail = ".?!".index(last) ? '  ' : ("\n"==last ? '' : '.  ')
    tail << 'Aborting.'
  end
  $stderr.puts "nanDoc: #{msg}#{tail}"
  exit 1
end