Method: YARD::Parser::Base#initialize

Defined in:
lib/yard/parser/base.rb

#initialize(source, filename) ⇒ Base

This default constructor does nothing. The subclass is responsible for storing the source contents and filename if they are required.

Parameters:

  • source (String)

    the source contents

  • filename (String)

    the name of the file if from disk

Raises:

  • (NotImplementedError)

Since:

  • 0.5.6



26
27
28
# File 'lib/yard/parser/base.rb', line 26

def initialize(source, filename) # rubocop:disable Lint/UnusedMethodArgument
  raise NotImplementedError, "invalid parser implementation"
end