Created
August 30, 2025 05:16
-
-
Save tompng/372a2d476c97cb6c20c1ca6d137ab8a4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module YARD | |
class Parser; end | |
class TagHandler; end | |
class ParseResult; end | |
def self.process(comment, code_object) | |
result = Parser.parse(comment) | |
tag_handler = TagHandler.new(code_object) | |
result.tags.each do |name, arg| | |
tag_handler.handle(name, arg) | |
end | |
result.text | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module YARD | |
def self.process(comment, code_object) | |
tags, tag_removed_text = Parser.parse(comment) | |
if result.tags[:api] | |
process_api_tag(result.tags[:api], code_object) | |
end | |
if result.tags[:private] | |
process_private_tag(result.tags[:private], code_object) | |
end | |
if result.tags[:yield] | |
process_yield(result.tags[:yield], code_object) | |
end | |
tag_removed_text | |
end | |
def self.parse(comment) | |
end | |
def self.process_api_tag(arg, code_object) | |
end | |
def self.process_private_tag(arg, code_object) | |
end | |
def self.process_yield(arg, code_object) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment