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



488
489
490
# File 'lib/html_to_markdown/native.rb', line 488

def content
  @content
end

#formatObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



488
489
490
# File 'lib/html_to_markdown/native.rb', line 488

def format
  @format
end

Class Method Details

.from_hash(hash) ⇒ Object



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

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

Instance Method Details

#code?Boolean

Returns:

  • (Boolean)


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

def code? = false

#definition_item?Boolean

Returns:

  • (Boolean)


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

def definition_item? = false

#definition_list?Boolean

Returns:

  • (Boolean)


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

def definition_list? = false

#group?Boolean

Returns:

  • (Boolean)


523
524
525
# File 'lib/html_to_markdown/native.rb', line 523

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

#heading?Boolean

Returns:

  • (Boolean)


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

def heading? = false

#image?Boolean

Returns:

  • (Boolean)


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

def image? = false

#list?Boolean

Returns:

  • (Boolean)


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

def list? = false

#list_item?Boolean

Returns:

  • (Boolean)


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

def list_item? = false

#metadata_block?Boolean

Returns:

  • (Boolean)


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

def  = false

#paragraph?Boolean

Returns:

  • (Boolean)


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

def paragraph? = false

#quote?Boolean

Returns:

  • (Boolean)


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

def quote? = false

#raw_block?Boolean

Returns:

  • (Boolean)


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

def raw_block? = true

#table?Boolean

Returns:

  • (Boolean)


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

def table? = false