Class: HtmlToMarkdown::NodeContentHeading
- Inherits:
-
Data
- Object
- Data
- HtmlToMarkdown::NodeContentHeading
- Extended by:
- T::Sig
- Includes:
- NodeContent
- Defined in:
- lib/html_to_markdown/native.rb
Overview
A heading element (h1-h6).
Instance Attribute Summary collapse
-
#level ⇒ Object
readonly
rubocop:disable Lint/UselessMethodDefinition.
-
#text ⇒ Object
readonly
rubocop:disable Lint/UselessMethodDefinition.
Class Method Summary collapse
Instance Method Summary collapse
- #code? ⇒ Boolean
- #definition_item? ⇒ Boolean
- #definition_list? ⇒ Boolean
- #group? ⇒ Boolean
- #heading? ⇒ Boolean
- #image? ⇒ Boolean
- #list? ⇒ Boolean
- #list_item? ⇒ Boolean
- #metadata_block? ⇒ Boolean
- #paragraph? ⇒ Boolean
- #quote? ⇒ Boolean
- #raw_block? ⇒ Boolean
- #table? ⇒ Boolean
Instance Attribute Details
#level ⇒ Object (readonly)
rubocop:disable Lint/UselessMethodDefinition
96 97 98 |
# File 'lib/html_to_markdown/native.rb', line 96 def level @level end |
#text ⇒ Object (readonly)
rubocop:disable Lint/UselessMethodDefinition
96 97 98 |
# File 'lib/html_to_markdown/native.rb', line 96 def text @text end |
Class Method Details
.from_hash(hash) ⇒ Object
135 136 137 |
# File 'lib/html_to_markdown/native.rb', line 135 def self.from_hash(hash) new(level: hash[:level] || hash["level"], text: hash[:text] || hash["text"]) end |
Instance Method Details
#code? ⇒ Boolean
119 |
# File 'lib/html_to_markdown/native.rb', line 119 def code? = false |
#definition_item? ⇒ Boolean
125 |
# File 'lib/html_to_markdown/native.rb', line 125 def definition_item? = false |
#definition_list? ⇒ Boolean
123 |
# File 'lib/html_to_markdown/native.rb', line 123 def definition_list? = false |
#group? ⇒ Boolean
131 132 133 |
# File 'lib/html_to_markdown/native.rb', line 131 def group? = false # @param hash [Hash] deserialized from the native extension # @return [self] |
#heading? ⇒ Boolean
107 |
# File 'lib/html_to_markdown/native.rb', line 107 def heading? = true |
#image? ⇒ Boolean
117 |
# File 'lib/html_to_markdown/native.rb', line 117 def image? = false |
#list? ⇒ Boolean
111 |
# File 'lib/html_to_markdown/native.rb', line 111 def list? = false |
#list_item? ⇒ Boolean
113 |
# File 'lib/html_to_markdown/native.rb', line 113 def list_item? = false |
#metadata_block? ⇒ Boolean
129 |
# File 'lib/html_to_markdown/native.rb', line 129 def = false |
#paragraph? ⇒ Boolean
109 |
# File 'lib/html_to_markdown/native.rb', line 109 def paragraph? = false |
#quote? ⇒ Boolean
121 |
# File 'lib/html_to_markdown/native.rb', line 121 def quote? = false |
#raw_block? ⇒ Boolean
127 |
# File 'lib/html_to_markdown/native.rb', line 127 def raw_block? = false |
#table? ⇒ Boolean
115 |
# File 'lib/html_to_markdown/native.rb', line 115 def table? = false |