Class: HtmlToMarkdown::NodeContentRawBlock

Inherits:
Data
  • Object
show all
Extended by:
T::Sig
Includes:
NodeContent
Defined in:
lib/html_to_markdown/native.rb

Overview

A raw block preserved as-is (e.g. <script>, <style> content).

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#contentObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



515
516
517
# File 'lib/html_to_markdown/native.rb', line 515

def content
  @content
end

#formatObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



515
516
517
# File 'lib/html_to_markdown/native.rb', line 515

def format
  @format
end

Class Method Details

.from_hash(hash) ⇒ Object



554
555
556
# File 'lib/html_to_markdown/native.rb', line 554

def self.from_hash(hash)
  new(format: hash[:format] || hash["format"], content: hash[:content] || hash["content"])
end

Instance Method Details

#code?Boolean

Returns:

  • (Boolean)


538
# File 'lib/html_to_markdown/native.rb', line 538

def code? = false

#definition_item?Boolean

Returns:

  • (Boolean)


544
# File 'lib/html_to_markdown/native.rb', line 544

def definition_item? = false

#definition_list?Boolean

Returns:

  • (Boolean)


542
# File 'lib/html_to_markdown/native.rb', line 542

def definition_list? = false

#group?Boolean

Returns:

  • (Boolean)


550
551
552
# File 'lib/html_to_markdown/native.rb', line 550

def group? = false
# @param hash [Hash] deserialized from the native extension
# @return [self]

#heading?Boolean

Returns:

  • (Boolean)


526
# File 'lib/html_to_markdown/native.rb', line 526

def heading? = false

#image?Boolean

Returns:

  • (Boolean)


536
# File 'lib/html_to_markdown/native.rb', line 536

def image? = false

#list?Boolean

Returns:

  • (Boolean)


530
# File 'lib/html_to_markdown/native.rb', line 530

def list? = false

#list_item?Boolean

Returns:

  • (Boolean)


532
# File 'lib/html_to_markdown/native.rb', line 532

def list_item? = false

#metadata_block?Boolean

Returns:

  • (Boolean)


548
# File 'lib/html_to_markdown/native.rb', line 548

def  = false

#paragraph?Boolean

Returns:

  • (Boolean)


528
# File 'lib/html_to_markdown/native.rb', line 528

def paragraph? = false

#quote?Boolean

Returns:

  • (Boolean)


540
# File 'lib/html_to_markdown/native.rb', line 540

def quote? = false

#raw_block?Boolean

Returns:

  • (Boolean)


546
# File 'lib/html_to_markdown/native.rb', line 546

def raw_block? = true

#table?Boolean

Returns:

  • (Boolean)


534
# File 'lib/html_to_markdown/native.rb', line 534

def table? = false