Class: YARDReadme::TagFactory

Inherits:
Object
  • Object
show all
Defined in:
lib/yard-readme/tag_factory.rb

Instance Method Summary collapse

Instance Method Details

#blank_readme_tag?(tag_name, text) ⇒ Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/yard-readme/tag_factory.rb', line 12

def blank_readme_tag?(tag_name, text)
  tag_name == "readme" && text.nil? || text.empty?
end

#parse_tag_with_title_and_text(tag_name, text) ⇒ Object



6
7
8
9
10
# File 'lib/yard-readme/tag_factory.rb', line 6

def parse_tag_with_title_and_text(tag_name, text)
  return YARD::Tags::Tag.new(tag_name, text) if blank_readme_tag?(tag_name, text)

  super
end