Class: ReadmeYard::ReadmeTag

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

Overview

By default, only the text nested under a @readme tag will be embedded in the final output. The default embed behavior can be changed through the use of tag names.

Class Method Summary collapse

Class Method Details

.format_tag(_yard_object, tag) ⇒ Object



27
28
29
# File 'lib/readme_yard/readme_tag.rb', line 27

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

.format_tags(yard_object, yard_tags) ⇒ Object



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

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