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
324 325 326 |
# File 'lib/html_to_markdown/native.rb', line 324 def language @language end |
#text ⇒ Object (readonly)
rubocop:disable Lint/UselessMethodDefinition
324 325 326 |
# File 'lib/html_to_markdown/native.rb', line 324 def text @text end |
Class Method Details
.from_hash(hash) ⇒ Object
363 364 365 |
# File 'lib/html_to_markdown/native.rb', line 363 def self.from_hash(hash) new(text: hash[:text] || hash["text"], language: hash[:language] || hash["language"]) end |
Instance Method Details
#code? ⇒ Boolean
347 |
# File 'lib/html_to_markdown/native.rb', line 347 def code? = true |
#definition_item? ⇒ Boolean
353 |
# File 'lib/html_to_markdown/native.rb', line 353 def definition_item? = false |
#definition_list? ⇒ Boolean
351 |
# File 'lib/html_to_markdown/native.rb', line 351 def definition_list? = false |
#group? ⇒ Boolean
359 360 361 |
# File 'lib/html_to_markdown/native.rb', line 359 def group? = false # @param hash [Hash] deserialized from the native extension # @return [self] |
#heading? ⇒ Boolean
335 |
# File 'lib/html_to_markdown/native.rb', line 335 def heading? = false |
#image? ⇒ Boolean
345 |
# File 'lib/html_to_markdown/native.rb', line 345 def image? = false |
#list? ⇒ Boolean
339 |
# File 'lib/html_to_markdown/native.rb', line 339 def list? = false |
#list_item? ⇒ Boolean
341 |
# File 'lib/html_to_markdown/native.rb', line 341 def list_item? = false |
#metadata_block? ⇒ Boolean
357 |
# File 'lib/html_to_markdown/native.rb', line 357 def = false |
#paragraph? ⇒ Boolean
337 |
# File 'lib/html_to_markdown/native.rb', line 337 def paragraph? = false |
#quote? ⇒ Boolean
349 |
# File 'lib/html_to_markdown/native.rb', line 349 def quote? = false |
#raw_block? ⇒ Boolean
355 |
# File 'lib/html_to_markdown/native.rb', line 355 def raw_block? = false |
#table? ⇒ Boolean
343 |
# File 'lib/html_to_markdown/native.rb', line 343 def table? = false |