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



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

def heading_level
  @heading_level
end

#heading_textObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



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

def heading_text
  @heading_text
end

#labelObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



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

def label
  @label
end

Class Method Details

.from_hash(hash) ⇒ Object



683
684
685
686
687
688
689
# File 'lib/html_to_markdown/native.rb', line 683

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)


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

def code? = false

#definition_item?Boolean

Returns:

  • (Boolean)


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

def definition_item? = false

#definition_list?Boolean

Returns:

  • (Boolean)


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

def definition_list? = false

#group?Boolean

Returns:

  • (Boolean)


679
680
681
# File 'lib/html_to_markdown/native.rb', line 679

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

#heading?Boolean

Returns:

  • (Boolean)


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

def heading? = false

#image?Boolean

Returns:

  • (Boolean)


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

def image? = false

#list?Boolean

Returns:

  • (Boolean)


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

def list? = false

#list_item?Boolean

Returns:

  • (Boolean)


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

def list_item? = false

#metadata_block?Boolean

Returns:

  • (Boolean)


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

def  = false

#paragraph?Boolean

Returns:

  • (Boolean)


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

def paragraph? = false

#quote?Boolean

Returns:

  • (Boolean)


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

def quote? = false

#raw_block?Boolean

Returns:

  • (Boolean)


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

def raw_block? = false

#table?Boolean

Returns:

  • (Boolean)


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

def table? = false