Class: Prawn::Dev::YardMarkup::Document

Inherits:
Kramdown::Document
  • Object
show all
Defined in:
lib/prawn/dev/yard_markup/document.rb

Instance Method Summary collapse

Constructor Details

#initialize(source, options = {}) ⇒ Document

Returns a new instance of Document.



29
30
31
# File 'lib/prawn/dev/yard_markup/document.rb', line 29

def initialize(source, options = {})
  super(source, default_options.merge(options))
end

Instance Method Details

#default_optionsObject



33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/prawn/dev/yard_markup/document.rb', line 33

def default_options
  {
    input: 'GFM',
    hard_wrap: false,
    syntax_highlighter: :rouge,
    syntax_highlighter_opts: {
      default_lang: 'ruby',
      block: { formatter: CodeFormatter },
      span: { formatter: CodeFormatter, inline: true },
    },
  }
end