Class: Source2MD::Type::ElementTitle2

Inherits:
Base
  • Object
show all
Defined in:
lib/source2md/type/element_title2.rb

Instance Attribute Summary

Attributes inherited from Base

#element

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Source2MD::Type::Base

Class Method Details

.accept?(element) ⇒ Boolean



4
5
6
# File 'lib/source2md/type/element_title2.rb', line 4

def self.accept?(element)
  element.head[:title2]
end

Instance Method Details

#to_mdObject



8
9
10
11
# File 'lib/source2md/type/element_title2.rb', line 8

def to_md
  Source2MD.logger.info { "title2: #{element.head[:title2]}" }
  "## #{element.head[:title2]} ##"
end