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



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

def content
  @content
end

#formatObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



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

def format
  @format
end

Class Method Details

.from_hash(hash) ⇒ Object



591
592
593
# File 'lib/html_to_markdown/native.rb', line 591

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

Instance Method Details

#code?Boolean

Returns:

  • (Boolean)


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

def code? = false

#definition_item?Boolean

Returns:

  • (Boolean)


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

def definition_item? = false

#definition_list?Boolean

Returns:

  • (Boolean)


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

def definition_list? = false

#group?Boolean

Returns:

  • (Boolean)


587
588
589
# File 'lib/html_to_markdown/native.rb', line 587

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

#heading?Boolean

Returns:

  • (Boolean)


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

def heading? = false

#image?Boolean

Returns:

  • (Boolean)


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

def image? = false

#list?Boolean

Returns:

  • (Boolean)


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

def list? = false

#list_item?Boolean

Returns:

  • (Boolean)


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

def list_item? = false

#metadata_block?Boolean

Returns:

  • (Boolean)


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

def  = false

#paragraph?Boolean

Returns:

  • (Boolean)


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

def paragraph? = false

#quote?Boolean

Returns:

  • (Boolean)


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

def quote? = false

#raw_block?Boolean

Returns:

  • (Boolean)


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

def raw_block? = true

#table?Boolean

Returns:

  • (Boolean)


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

def table? = false