Class: ReadmeYard::ReadmeTag

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

Overview

By default, only the text nested under the @readme tag will be embedded in the final output.

Different embed options are provided via the following name options: comment, source, and object.

Class Method Summary collapse

Class Method Details

.format_markdown(yard_object, yard_tags) ⇒ Object



16
17
18
19
20
21
22
23
# File 'lib/readme_yard/readme_tag.rb', line 16

def format_markdown(yard_object, yard_tags)
  md = +""
  yard_tags.each do |tag|
    res = format_yard_tag(yard_object, tag)
    md << res if res
  end
  md
end

.format_tag_markdown(_yard_object, tag) ⇒ Object



25
26
27
# File 'lib/readme_yard/readme_tag.rb', line 25

def format_tag_markdown(_yard_object, tag)
  "#{tag.text}\n"
end