Class: HtmlToMarkdown::NodeContentGroup

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

Overview

A section grouping container (auto-generated from heading hierarchy).

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#heading_levelObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



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

def heading_level
  @heading_level
end

#heading_textObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



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

def heading_text
  @heading_text
end

#labelObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



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

def label
  @label
end

Class Method Details

.from_hash(hash) ⇒ Object



615
616
617
# File 'lib/html_to_markdown/native.rb', line 615

def self.from_hash(hash)
  new(label: hash[:label] || hash["label"], heading_level: hash[:heading_level] || hash["heading_level"], heading_text: hash[:heading_text] || hash["heading_text"])
end

Instance Method Details

#code?Boolean

Returns:

  • (Boolean)


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

def code? = false

#definition_item?Boolean

Returns:

  • (Boolean)


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

def definition_item? = false

#definition_list?Boolean

Returns:

  • (Boolean)


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

def definition_list? = false

#group?Boolean

Returns:

  • (Boolean)


611
612
613
# File 'lib/html_to_markdown/native.rb', line 611

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

#heading?Boolean

Returns:

  • (Boolean)


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

def heading? = false

#image?Boolean

Returns:

  • (Boolean)


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

def image? = false

#list?Boolean

Returns:

  • (Boolean)


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

def list? = false

#list_item?Boolean

Returns:

  • (Boolean)


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

def list_item? = false

#metadata_block?Boolean

Returns:

  • (Boolean)


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

def  = false

#paragraph?Boolean

Returns:

  • (Boolean)


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

def paragraph? = false

#quote?Boolean

Returns:

  • (Boolean)


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

def quote? = false

#raw_block?Boolean

Returns:

  • (Boolean)


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

def raw_block? = false

#table?Boolean

Returns:

  • (Boolean)


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

def table? = false