Class: Source2MD::Formatter::TypeTitle
- Inherits:
-
Base
- Object
- Base
- Source2MD::Formatter::TypeTitle
show all
- Defined in:
- lib/source2md/formatter/type_title.rb
Constant Summary
collapse
- REGEXP =
/\Atitle(\d+)\z/
Instance Attribute Summary
Attributes inherited from Base
#element
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Class Method Details
.accept?(element) ⇒ Boolean
6
7
8
|
# File 'lib/source2md/formatter/type_title.rb', line 6
def self.accept?(element)
element.head.keys.any? { |e| e.match?(REGEXP) }
end
|
Instance Method Details
#to_md ⇒ Object
10
11
12
13
14
|
# File 'lib/source2md/formatter/type_title.rb', line 10
def to_md
s = [prefix, body, prefix] * " "
Source2MD.logger.warn { s }
s
end
|