Class: HtmlToMarkdown::NodeContentHeading

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

Overview

A heading element (h1-h6).

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#level ⇒ Object (readonly)

Returns the value of attribute level

Returns:

  • (Object) —

    the current value of level



440
441
442
# File 'lib/html_to_markdown/native.rb', line 440

def level
  @level
end

#text ⇒ Object (readonly)

Returns the value of attribute text

Returns:

  • (Object) —

    the current value of text



440
441
442
# File 'lib/html_to_markdown/native.rb', line 440

def text
  @text
end

Class Method Details

.from_hash(hash) ⇒ Object



479
480
481
# File 'lib/html_to_markdown/native.rb', line 479

def self.from_hash(hash)
  new(level: hash[:level] || hash["level"], text: hash[:text] || hash["text"])
end

Instance Method Details

#code? ⇒ Boolean

Returns:

  • (Boolean)


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

def code? = false

#definition_item? ⇒ Boolean

Returns:

  • (Boolean)


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

def definition_item? = false

#definition_list? ⇒ Boolean

Returns:

  • (Boolean)


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

def definition_list? = false

#group? ⇒ Boolean

Returns:

  • (Boolean)


475
476
477
# File 'lib/html_to_markdown/native.rb', line 475

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

#heading? ⇒ Boolean

Returns:

  • (Boolean)


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

def heading? = true

#image? ⇒ Boolean

Returns:

  • (Boolean)


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

def image? = false

#list? ⇒ Boolean

Returns:

  • (Boolean)


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

def list? = false

#list_item? ⇒ Boolean

Returns:

  • (Boolean)


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

def list_item? = false

#metadata_block? ⇒ Boolean

Returns:

  • (Boolean)


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

def  = false

#paragraph? ⇒ Boolean

Returns:

  • (Boolean)


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

def paragraph? = false

#quote? ⇒ Boolean

Returns:

  • (Boolean)


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

def quote? = false

#raw_block? ⇒ Boolean

Returns:

  • (Boolean)


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

def raw_block? = false

#table? ⇒ Boolean

Returns:

  • (Boolean)


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

def table? = false