Class: Source2MD::Type::ElementText
- Inherits:
-
Base
- Object
- Base
- Source2MD::Type::ElementText
show all
- Defined in:
- lib/source2md/type/element_text.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
9
10
11
12
13
|
# File 'lib/source2md/type/element_text.rb', line 9
def self.accept?(element)
if element.head.blank?
element.body.lines.all? { |e| e.start_with?("# ") }
end
end
|
Instance Method Details
#to_md ⇒ Object
15
16
17
|
# File 'lib/source2md/type/element_text.rb', line 15
def to_md
body
end
|