Class: YARD::Handlers::Rustdoc::Base
- Inherits:
-
Base
- Object
- Base
- YARD::Handlers::Rustdoc::Base
show all
- Includes:
- Parser::Rustdoc
- Defined in:
- lib/yard-rustdoc/handlers.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.handles?(statement, processor) ⇒ Boolean
15
16
17
18
19
20
21
22
|
# File 'lib/yard-rustdoc/handlers.rb', line 15
def self.handles?(statement, processor)
handles = true
if @statement_classes.any?
handles &&= @statement_classes.any? { |klass| statement.is_a?(klass) }
end
handles
end
|
.statement_class(klass = nil) ⇒ Object
8
9
10
11
12
13
|
# File 'lib/yard-rustdoc/handlers.rb', line 8
def self.statement_class(klass = nil)
@statement_classes ||= []
@statement_classes << klass
nil
end
|
Instance Method Details
#register_docstring(object, docstring = statement.docstring, stmt = statement) ⇒ Object
28
29
30
|
# File 'lib/yard-rustdoc/handlers.rb', line 28
def register_docstring(object, docstring = statement.docstring, stmt = statement)
super
end
|
#register_file_info(object, file = statement.file, line = statement.line, comments = statement.docstring) ⇒ Object
24
25
26
|
# File 'lib/yard-rustdoc/handlers.rb', line 24
def register_file_info(object, file = statement.file, line = statement.line, = statement.docstring)
super
end
|