Class: HtmlToMarkdown::NodeContentCode
- Inherits:
-
Data
- Object
- Data
- HtmlToMarkdown::NodeContentCode
- Extended by:
- T::Sig
- Includes:
- NodeContent
- Defined in:
- lib/html_to_markdown/native.rb
Overview
A code block or inline code.
Instance Attribute Summary collapse
-
#language ⇒ 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
#language ⇒ Object (readonly)
rubocop:disable Lint/UselessMethodDefinition
355 356 357 |
# File 'lib/html_to_markdown/native.rb', line 355 def language @language end |
#text ⇒ Object (readonly)
rubocop:disable Lint/UselessMethodDefinition
355 356 357 |
# File 'lib/html_to_markdown/native.rb', line 355 def text @text end |
Class Method Details
.from_hash(hash) ⇒ Object
396 397 398 |
# File 'lib/html_to_markdown/native.rb', line 396 def self.from_hash(hash) new(text: hash[:text] || hash["text"], language: hash[:language] || hash["language"]) end |
Instance Method Details
#code? ⇒ Boolean
380 |
# File 'lib/html_to_markdown/native.rb', line 380 def code? = true |
#definition_item? ⇒ Boolean
386 |
# File 'lib/html_to_markdown/native.rb', line 386 def definition_item? = false |
#definition_list? ⇒ Boolean
384 |
# File 'lib/html_to_markdown/native.rb', line 384 def definition_list? = false |
#group? ⇒ Boolean
392 393 394 |
# File 'lib/html_to_markdown/native.rb', line 392 def group? = false # @param hash [Hash] deserialized from the native extension # @return [self] |
#heading? ⇒ Boolean
368 |
# File 'lib/html_to_markdown/native.rb', line 368 def heading? = false |
#image? ⇒ Boolean
378 |
# File 'lib/html_to_markdown/native.rb', line 378 def image? = false |
#list? ⇒ Boolean
372 |
# File 'lib/html_to_markdown/native.rb', line 372 def list? = false |
#list_item? ⇒ Boolean
374 |
# File 'lib/html_to_markdown/native.rb', line 374 def list_item? = false |
#metadata_block? ⇒ Boolean
390 |
# File 'lib/html_to_markdown/native.rb', line 390 def = false |
#paragraph? ⇒ Boolean
370 |
# File 'lib/html_to_markdown/native.rb', line 370 def paragraph? = false |
#quote? ⇒ Boolean
382 |
# File 'lib/html_to_markdown/native.rb', line 382 def quote? = false |
#raw_block? ⇒ Boolean
388 |
# File 'lib/html_to_markdown/native.rb', line 388 def raw_block? = false |
#table? ⇒ Boolean
376 |
# File 'lib/html_to_markdown/native.rb', line 376 def table? = false |