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

#value ⇒ Object (readonly)

Returns the value of attribute value

Returns:

  • (Object) —

    the current value of value



1060
1061
1062
# File 'lib/html_to_markdown/native.rb', line 1060

def value
  @value
end

Class Method Details

.from_hash(hash) ⇒ Object



1080
1081
1082
# File 'lib/html_to_markdown/native.rb', line 1080

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

Instance Method Details

#continue? ⇒ Boolean

Returns:

  • (Boolean)


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

def continue? = false

#custom? ⇒ Boolean

Returns:

  • (Boolean)


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

def custom? = true

#error? ⇒ Boolean

Returns:

  • (Boolean)


1076
1077
1078
# File 'lib/html_to_markdown/native.rb', line 1076

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

#preserve_html? ⇒ Boolean

Returns:

  • (Boolean)


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

def preserve_html? = false

#skip? ⇒ Boolean

Returns:

  • (Boolean)


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

def skip? = false