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
382 383 384 |
# File 'lib/html_to_markdown/native.rb', line 382 def language @language end |
#text ⇒ Object (readonly)
rubocop:disable Lint/UselessMethodDefinition
382 383 384 |
# File 'lib/html_to_markdown/native.rb', line 382 def text @text end |
Class Method Details
.from_hash(hash) ⇒ Object
423 424 425 |
# File 'lib/html_to_markdown/native.rb', line 423 def self.from_hash(hash) new(text: hash[:text] || hash["text"], language: hash[:language] || hash["language"]) end |
Instance Method Details
#code? ⇒ Boolean
407 |
# File 'lib/html_to_markdown/native.rb', line 407 def code? = true |
#definition_item? ⇒ Boolean
413 |
# File 'lib/html_to_markdown/native.rb', line 413 def definition_item? = false |
#definition_list? ⇒ Boolean
411 |
# File 'lib/html_to_markdown/native.rb', line 411 def definition_list? = false |
#group? ⇒ Boolean
419 420 421 |
# File 'lib/html_to_markdown/native.rb', line 419 def group? = false # @param hash [Hash] deserialized from the native extension # @return [self] |
#heading? ⇒ Boolean
395 |
# File 'lib/html_to_markdown/native.rb', line 395 def heading? = false |
#image? ⇒ Boolean
405 |
# File 'lib/html_to_markdown/native.rb', line 405 def image? = false |
#list? ⇒ Boolean
399 |
# File 'lib/html_to_markdown/native.rb', line 399 def list? = false |
#list_item? ⇒ Boolean
401 |
# File 'lib/html_to_markdown/native.rb', line 401 def list_item? = false |
#metadata_block? ⇒ Boolean
417 |
# File 'lib/html_to_markdown/native.rb', line 417 def = false |
#paragraph? ⇒ Boolean
397 |
# File 'lib/html_to_markdown/native.rb', line 397 def paragraph? = false |
#quote? ⇒ Boolean
409 |
# File 'lib/html_to_markdown/native.rb', line 409 def quote? = false |
#raw_block? ⇒ Boolean
415 |
# File 'lib/html_to_markdown/native.rb', line 415 def raw_block? = false |
#table? ⇒ Boolean
403 |
# File 'lib/html_to_markdown/native.rb', line 403 def table? = false |