Class: HtmlToMarkdown::NodeContentDefinitionItem

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

Overview

A definition list entry with term and description.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#definition ⇒ Object (readonly)

Returns the value of attribute definition

Returns:

  • (Object) —

    the current value of definition



819
820
821
# File 'lib/html_to_markdown/native.rb', line 819

def definition
  @definition
end

#term ⇒ Object (readonly)

Returns the value of attribute term

Returns:

  • (Object) —

    the current value of term



819
820
821
# File 'lib/html_to_markdown/native.rb', line 819

def term
  @term
end

Class Method Details

.from_hash(hash) ⇒ Object



858
859
860
# File 'lib/html_to_markdown/native.rb', line 858

def self.from_hash(hash)
  new(term: hash[:term] || hash["term"], definition: hash[:definition] || hash["definition"])
end

Instance Method Details

#code? ⇒ Boolean

Returns:

  • (Boolean)


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

def code? = false

#definition_item? ⇒ Boolean

Returns:

  • (Boolean)


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

def definition_item? = true

#definition_list? ⇒ Boolean

Returns:

  • (Boolean)


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

def definition_list? = false

#group? ⇒ Boolean

Returns:

  • (Boolean)


854
855
856
# File 'lib/html_to_markdown/native.rb', line 854

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

#heading? ⇒ Boolean

Returns:

  • (Boolean)


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

def heading? = false

#image? ⇒ Boolean

Returns:

  • (Boolean)


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

def image? = false

#list? ⇒ Boolean

Returns:

  • (Boolean)


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

def list? = false

#list_item? ⇒ Boolean

Returns:

  • (Boolean)


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

def list_item? = false

#metadata_block? ⇒ Boolean

Returns:

  • (Boolean)


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

def  = false

#paragraph? ⇒ Boolean

Returns:

  • (Boolean)


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

def paragraph? = false

#quote? ⇒ Boolean

Returns:

  • (Boolean)


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

def quote? = false

#raw_block? ⇒ Boolean

Returns:

  • (Boolean)


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

def raw_block? = false

#table? ⇒ Boolean

Returns:

  • (Boolean)


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

def table? = false