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

#levelObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



69
70
71
# File 'lib/html_to_markdown/native.rb', line 69

def level
  @level
end

#textObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



69
70
71
# File 'lib/html_to_markdown/native.rb', line 69

def text
  @text
end

Class Method Details

.from_hash(hash) ⇒ Object



108
109
110
# File 'lib/html_to_markdown/native.rb', line 108

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

Instance Method Details

#code?Boolean

Returns:

  • (Boolean)


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

def code? = false

#definition_item?Boolean

Returns:

  • (Boolean)


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

def definition_item? = false

#definition_list?Boolean

Returns:

  • (Boolean)


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

def definition_list? = false

#group?Boolean

Returns:

  • (Boolean)


104
105
106
# File 'lib/html_to_markdown/native.rb', line 104

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

#heading?Boolean

Returns:

  • (Boolean)


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

def heading? = true

#image?Boolean

Returns:

  • (Boolean)


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

def image? = false

#list?Boolean

Returns:

  • (Boolean)


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

def list? = false

#list_item?Boolean

Returns:

  • (Boolean)


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

def list_item? = false

#metadata_block?Boolean

Returns:

  • (Boolean)


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

def  = false

#paragraph?Boolean

Returns:

  • (Boolean)


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

def paragraph? = false

#quote?Boolean

Returns:

  • (Boolean)


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

def quote? = false

#raw_block?Boolean

Returns:

  • (Boolean)


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

def raw_block? = false

#table?Boolean

Returns:

  • (Boolean)


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

def table? = false