Class: ReadmeYard::ObjectTag

Inherits:
Object
  • Object
show all
Defined in:
lib/readme_yard/object_tag.rb

Overview

@readme object - Embeds the comment and source.

Class Method Summary collapse

Class Method Details

.format_tag_markdown(yard_object, _tag) ⇒ Object

This method's comment and code is in the README because because @readme object is below, in the actual source code.

object



14
15
16
17
18
# File 'lib/readme_yard/object_tag.rb', line 14

def format_tag_markdown(yard_object, _tag)
  text = CommentTag.format_docstring_as_comment(yard_object)
  text << "\n#{yard_object.source}"
  ExampleTag.format_ruby(text)
end