Top Level Namespace

Defined Under Namespace

Modules: Prawn, RuboCop

Constant Summary collapse

YARD_OPTIONS =
[
  '--output-dir', 'doc/html',
  '--verbose', '--debug',
  '--load', File.expand_path('yard_markup.rb', __dir__),
  '--markup', 'markdown',
  '--markup-provider', 'prawn/dev/yard_markup/document',
  '--use-cache',
]

Instance Method Summary collapse

Instance Method Details

#stash_yardoptsObject



54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/prawn/dev/tasks.rb', line 54

def stash_yardopts
  if File.exist?('.yardopts')
    begin
      original_opts = Shellwords.shellsplit File.read('.yardopts')
      require('securerandom')
      backup_file = ".yardopts-#{SecureRandom.alphanumeric(16)}.backup"
      FileUtils.move('.yardopts', backup_file)
      yield original_opts
    ensure
      FileUtils.move(backup_file, '.yardopts')
    end
  else
    yield []
  end
end