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



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

def level
  @level
end

#textObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



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

def text
  @text
end

Class Method Details

.from_hash(hash) ⇒ Object



128
129
130
# File 'lib/html_to_markdown/native.rb', line 128

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

Instance Method Details

#code?Boolean

Returns:

  • (Boolean)


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

def code? = false

#definition_item?Boolean

Returns:

  • (Boolean)


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

def definition_item? = false

#definition_list?Boolean

Returns:

  • (Boolean)


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

def definition_list? = false

#group?Boolean

Returns:

  • (Boolean)


124
125
126
# File 'lib/html_to_markdown/native.rb', line 124

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

#heading?Boolean

Returns:

  • (Boolean)


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

def heading? = true

#image?Boolean

Returns:

  • (Boolean)


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

def image? = false

#list?Boolean

Returns:

  • (Boolean)


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

def list? = false

#list_item?Boolean

Returns:

  • (Boolean)


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

def list_item? = false

#metadata_block?Boolean

Returns:

  • (Boolean)


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

def  = false

#paragraph?Boolean

Returns:

  • (Boolean)


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

def paragraph? = false

#quote?Boolean

Returns:

  • (Boolean)


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

def quote? = false

#raw_block?Boolean

Returns:

  • (Boolean)


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

def raw_block? = false

#table?Boolean

Returns:

  • (Boolean)


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

def table? = false