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



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

def level
  @level
end

#textObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



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

def text
  @text
end

Class Method Details

.from_hash(hash) ⇒ Object



155
156
157
# File 'lib/html_to_markdown/native.rb', line 155

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

Instance Method Details

#code?Boolean

Returns:

  • (Boolean)


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

def code? = false

#definition_item?Boolean

Returns:

  • (Boolean)


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

def definition_item? = false

#definition_list?Boolean

Returns:

  • (Boolean)


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

def definition_list? = false

#group?Boolean

Returns:

  • (Boolean)


151
152
153
# File 'lib/html_to_markdown/native.rb', line 151

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

#heading?Boolean

Returns:

  • (Boolean)


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

def heading? = true

#image?Boolean

Returns:

  • (Boolean)


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

def image? = false

#list?Boolean

Returns:

  • (Boolean)


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

def list? = false

#list_item?Boolean

Returns:

  • (Boolean)


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

def list_item? = false

#metadata_block?Boolean

Returns:

  • (Boolean)


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

def  = false

#paragraph?Boolean

Returns:

  • (Boolean)


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

def paragraph? = false

#quote?Boolean

Returns:

  • (Boolean)


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

def quote? = false

#raw_block?Boolean

Returns:

  • (Boolean)


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

def raw_block? = false

#table?Boolean

Returns:

  • (Boolean)


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

def table? = false