Method: YARD::Docstring#initialize
- Defined in:
- lib/yard/docstring.rb
#initialize(content = '', object = nil) ⇒ Docstring
Note:
To properly parse directives with proper parser context within handlers, you should not use this method to create a Docstring. Instead, use YARD::DocstringParser, which takes a handler object that can pass parser state onto directives. If a Docstring is created with this method, directives do not have access to any parser state, and may not function as expected.
Creates a new docstring with the raw contents attached to an optional object. Parsing will be done by the YARD::DocstringParser class.
73 74 75 76 77 78 79 |
# File 'lib/yard/docstring.rb', line 73 def initialize(content = '', object = nil) @object = object @summary = nil @hash_flag = false self.all = content end |