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
87 88 89 |
# File 'lib/html_to_markdown/native.rb', line 87 def level @level end |
#text ⇒ Object (readonly)
rubocop:disable Lint/UselessMethodDefinition
87 88 89 |
# File 'lib/html_to_markdown/native.rb', line 87 def text @text end |
Class Method Details
.from_hash(hash) ⇒ Object
128 129 130 |
# File 'lib/html_to_markdown/native.rb', line 128 def self.from_hash(hash) new(level: hash[:level] || hash["level"], text: hash[:text] || hash["text"]) end |
Instance Method Details
#code? ⇒ Boolean
112 |
# File 'lib/html_to_markdown/native.rb', line 112 def code? = false |
#definition_item? ⇒ Boolean
118 |
# File 'lib/html_to_markdown/native.rb', line 118 def definition_item? = false |
#definition_list? ⇒ Boolean
116 |
# File 'lib/html_to_markdown/native.rb', line 116 def definition_list? = false |
#group? ⇒ Boolean
124 125 126 |
# File 'lib/html_to_markdown/native.rb', line 124 def group? = false # @param hash [Hash] deserialized from the native extension # @return [self] |
#heading? ⇒ Boolean
100 |
# File 'lib/html_to_markdown/native.rb', line 100 def heading? = true |
#image? ⇒ Boolean
110 |
# File 'lib/html_to_markdown/native.rb', line 110 def image? = false |
#list? ⇒ Boolean
104 |
# File 'lib/html_to_markdown/native.rb', line 104 def list? = false |
#list_item? ⇒ Boolean
106 |
# File 'lib/html_to_markdown/native.rb', line 106 def list_item? = false |
#metadata_block? ⇒ Boolean
122 |
# File 'lib/html_to_markdown/native.rb', line 122 def = false |
#paragraph? ⇒ Boolean
102 |
# File 'lib/html_to_markdown/native.rb', line 102 def paragraph? = false |
#quote? ⇒ Boolean
114 |
# File 'lib/html_to_markdown/native.rb', line 114 def quote? = false |
#raw_block? ⇒ Boolean
120 |
# File 'lib/html_to_markdown/native.rb', line 120 def raw_block? = false |
#table? ⇒ Boolean
108 |
# File 'lib/html_to_markdown/native.rb', line 108 def table? = false |