Class: Forspell::Loaders::Ruby

Inherits:
Source show all
Defined in:
lib/forspell/loaders/ruby.rb

Constant Summary collapse

MAX_COMMENT_LENGTH =
777

Instance Method Summary collapse

Methods inherited from Base

#read

Constructor Details

#initialize(file: nil, text: nil) ⇒ Ruby

Returns a new instance of Ruby.



12
13
14
15
16
17
# File 'lib/forspell/loaders/ruby.rb', line 12

def initialize(file: nil, text: nil)
  super
  @markup = RDoc::Markup.new
  @formatter = RDoc::Markup::ToMarkdown.new
  @formatter.width = MAX_COMMENT_LENGTH
end