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


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

def initialize(source, filename)
  raise NotImplementedError, "invalid parser implementation"
end