Class: Source2MD::Formatter::TypeText
- Defined in:
- lib/source2md/formatter/type_text.rb
Instance Attribute Summary
Attributes inherited from Base
Class Method Summary collapse
- .accept?(element) ⇒ Boolean
-
.regexp ⇒ Object
“# xxx” “#”.
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Source2MD::Formatter::Base
Class Method Details
.accept?(element) ⇒ Boolean
11 12 13 14 15 |
# File 'lib/source2md/formatter/type_text.rb', line 11 def self.accept?(element) if element.body.present? element.body.lines.all? { |e| e.match?(regexp) } end end |
.regexp ⇒ Object
“# xxx” “#”
7 8 9 |
# File 'lib/source2md/formatter/type_text.rb', line 7 def self.regexp %r{#{RE.}( |$)} end |
Instance Method Details
#to_md ⇒ Object
17 18 19 |
# File 'lib/source2md/formatter/type_text.rb', line 17 def to_md body end |