Class: ReadmeYard::SourceTag
- Inherits:
-
Object
- Object
- ReadmeYard::SourceTag
- Defined in:
- lib/readme_yard/source_tag.rb
Overview
Embed Ruby comments and code
Class Method Summary collapse
-
.format_tag(yard_object, _tag) ⇒ Object
The comment and code for ReadmeYard::SourceTag#format_tag is in the README because
@readme source
is below (in the source code). - .format_yard_object(yard_object) ⇒ Object
Class Method Details
.format_tag(yard_object, _tag) ⇒ Object
The comment and code for ReadmeYard::SourceTag#format_tag
is in the README because @readme source
is below (in the source code).
19 20 21 22 23 |
# File 'lib/readme_yard/source_tag.rb', line 19 def format_tag(yard_object, _tag) text = CommentTag.format_docstring_as_comment(yard_object) text << "\n#{yard_object.source}" ExampleTag.format_ruby(text) end |
.format_yard_object(yard_object) ⇒ Object
25 26 27 |
# File 'lib/readme_yard/source_tag.rb', line 25 def format_yard_object(yard_object) format_tag(yard_object, nil) end |