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



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

def heading_level
  @heading_level
end

#heading_textObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



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

def heading_text
  @heading_text
end

#labelObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



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

def label
  @label
end

Class Method Details

.from_hash(hash) ⇒ Object



642
643
644
# File 'lib/html_to_markdown/native.rb', line 642

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)


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

def code? = false

#definition_item?Boolean

Returns:

  • (Boolean)


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

def definition_item? = false

#definition_list?Boolean

Returns:

  • (Boolean)


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

def definition_list? = false

#group?Boolean

Returns:

  • (Boolean)


638
639
640
# File 'lib/html_to_markdown/native.rb', line 638

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

#heading?Boolean

Returns:

  • (Boolean)


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

def heading? = false

#image?Boolean

Returns:

  • (Boolean)


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

def image? = false

#list?Boolean

Returns:

  • (Boolean)


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

def list? = false

#list_item?Boolean

Returns:

  • (Boolean)


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

def list_item? = false

#metadata_block?Boolean

Returns:

  • (Boolean)


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

def  = false

#paragraph?Boolean

Returns:

  • (Boolean)


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

def paragraph? = false

#quote?Boolean

Returns:

  • (Boolean)


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

def quote? = false

#raw_block?Boolean

Returns:

  • (Boolean)


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

def raw_block? = false

#table?Boolean

Returns:

  • (Boolean)


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

def table? = false