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



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

def level
  @level
end

#textObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



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

def text
  @text
end

Class Method Details

.from_hash(hash) ⇒ Object



135
136
137
# File 'lib/html_to_markdown/native.rb', line 135

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

Instance Method Details

#code?Boolean

Returns:

  • (Boolean)


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

def code? = false

#definition_item?Boolean

Returns:

  • (Boolean)


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

def definition_item? = false

#definition_list?Boolean

Returns:

  • (Boolean)


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

def definition_list? = false

#group?Boolean

Returns:

  • (Boolean)


131
132
133
# File 'lib/html_to_markdown/native.rb', line 131

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

#heading?Boolean

Returns:

  • (Boolean)


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

def heading? = true

#image?Boolean

Returns:

  • (Boolean)


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

def image? = false

#list?Boolean

Returns:

  • (Boolean)


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

def list? = false

#list_item?Boolean

Returns:

  • (Boolean)


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

def list_item? = false

#metadata_block?Boolean

Returns:

  • (Boolean)


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

def  = false

#paragraph?Boolean

Returns:

  • (Boolean)


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

def paragraph? = false

#quote?Boolean

Returns:

  • (Boolean)


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

def quote? = false

#raw_block?Boolean

Returns:

  • (Boolean)


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

def raw_block? = false

#table?Boolean

Returns:

  • (Boolean)


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

def table? = false