class Summary
Represents a section within a release.
Definitions
def initialize(node)
Initialize a release section summary.
Signature
-
parameter
nodeMarkly::Node The section heading node.
Implementation
def initialize(node)
@node = node
end
attr :node
The section heading node.
Signature
-
attribute
Markly::Node
def id
Generate the section identifier.
Signature
-
returns
String The normalized section identifier.
Implementation
def id
@node.to_plaintext.chomp.downcase.gsub(/\s+/, "-")
end
def to_markdown
Render the section heading contents as Markdown.
Signature
-
returns
String The rendered Markdown.
Implementation
def to_markdown
@node.dup.extract_children.to_markdown
end
def to_html
Render the section heading contents as HTML.
Signature
-
returns
String The rendered HTML.
Implementation
def to_html
@node.dup.extract_children.to_html
end