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



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

def heading_level
  @heading_level
end

#heading_textObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



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

def heading_text
  @heading_text
end

#labelObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



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

def label
  @label
end

Class Method Details

.from_hash(hash) ⇒ Object



656
657
658
659
660
661
662
# File 'lib/html_to_markdown/native.rb', line 656

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)


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

def code? = false

#definition_item?Boolean

Returns:

  • (Boolean)


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

def definition_item? = false

#definition_list?Boolean

Returns:

  • (Boolean)


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

def definition_list? = false

#group?Boolean

Returns:

  • (Boolean)


652
653
654
# File 'lib/html_to_markdown/native.rb', line 652

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

#heading?Boolean

Returns:

  • (Boolean)


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

def heading? = false

#image?Boolean

Returns:

  • (Boolean)


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

def image? = false

#list?Boolean

Returns:

  • (Boolean)


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

def list? = false

#list_item?Boolean

Returns:

  • (Boolean)


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

def list_item? = false

#metadata_block?Boolean

Returns:

  • (Boolean)


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

def  = false

#paragraph?Boolean

Returns:

  • (Boolean)


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

def paragraph? = false

#quote?Boolean

Returns:

  • (Boolean)


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

def quote? = false

#raw_block?Boolean

Returns:

  • (Boolean)


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

def raw_block? = false

#table?Boolean

Returns:

  • (Boolean)


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

def table? = false