Class: HtmlToMarkdown::VisitResultCustom

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

Overview

Replace default output with custom markdown

The visitor takes full responsibility for the markdown output of this node and its children.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#valueObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



1018
1019
1020
# File 'lib/html_to_markdown/native.rb', line 1018

def value
  @value
end

Class Method Details

.from_hash(hash) ⇒ Object



1038
1039
1040
# File 'lib/html_to_markdown/native.rb', line 1038

def self.from_hash(hash)
  new(value: hash[:_0] || hash["_0"])
end

Instance Method Details

#continue?Boolean

Returns:

  • (Boolean)


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

def continue? = false

#custom?Boolean

Returns:

  • (Boolean)


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

def custom? = true

#error?Boolean

Returns:

  • (Boolean)


1034
1035
1036
# File 'lib/html_to_markdown/native.rb', line 1034

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

#preserve_html?Boolean

Returns:

  • (Boolean)


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

def preserve_html? = false

#skip?Boolean

Returns:

  • (Boolean)


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

def skip? = false