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
69 70 71 |
# File 'lib/html_to_markdown/native.rb', line 69 def level @level end |
#text ⇒ Object (readonly)
rubocop:disable Lint/UselessMethodDefinition
69 70 71 |
# File 'lib/html_to_markdown/native.rb', line 69 def text @text end |
Class Method Details
.from_hash(hash) ⇒ Object
108 109 110 |
# File 'lib/html_to_markdown/native.rb', line 108 def self.from_hash(hash) new(level: hash[:level] || hash["level"], text: hash[:text] || hash["text"]) end |
Instance Method Details
#code? ⇒ Boolean
92 |
# File 'lib/html_to_markdown/native.rb', line 92 def code? = false |
#definition_item? ⇒ Boolean
98 |
# File 'lib/html_to_markdown/native.rb', line 98 def definition_item? = false |
#definition_list? ⇒ Boolean
96 |
# File 'lib/html_to_markdown/native.rb', line 96 def definition_list? = false |
#group? ⇒ Boolean
104 105 106 |
# File 'lib/html_to_markdown/native.rb', line 104 def group? = false # @param hash [Hash] deserialized from the native extension # @return [self] |
#heading? ⇒ Boolean
80 |
# File 'lib/html_to_markdown/native.rb', line 80 def heading? = true |
#image? ⇒ Boolean
90 |
# File 'lib/html_to_markdown/native.rb', line 90 def image? = false |
#list? ⇒ Boolean
84 |
# File 'lib/html_to_markdown/native.rb', line 84 def list? = false |
#list_item? ⇒ Boolean
86 |
# File 'lib/html_to_markdown/native.rb', line 86 def list_item? = false |
#metadata_block? ⇒ Boolean
102 |
# File 'lib/html_to_markdown/native.rb', line 102 def = false |
#paragraph? ⇒ Boolean
82 |
# File 'lib/html_to_markdown/native.rb', line 82 def paragraph? = false |
#quote? ⇒ Boolean
94 |
# File 'lib/html_to_markdown/native.rb', line 94 def quote? = false |
#raw_block? ⇒ Boolean
100 |
# File 'lib/html_to_markdown/native.rb', line 100 def raw_block? = false |
#table? ⇒ Boolean
88 |
# File 'lib/html_to_markdown/native.rb', line 88 def table? = false |