Class: Source2MD::Type::ElementHeaderComment
- Inherits:
-
Base
- Object
- Base
- Source2MD::Type::ElementHeaderComment
show all
- Defined in:
- lib/source2md/type/__element_header_comment.rb
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
16
17
18
|
# File 'lib/source2md/type/__element_header_comment.rb', line 16
def self.accept?(element)
element.body.match?(/^#-/)
end
|
Instance Method Details
#to_md ⇒ Object
20
21
22
23
24
25
26
27
|
# File 'lib/source2md/type/__element_header_comment.rb', line 20
def to_md
[
message,
"```ruby",
body,
"```",
] * "\n"
end
|