Class: HtmlToMarkdown::NodeContentRawBlock

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

Overview

A raw block preserved as-is (e.g. <script>, <style> content).

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#content ⇒ Object (readonly)

Returns the value of attribute content

Returns:

  • (Object) —

    the current value of content



863
864
865
# File 'lib/html_to_markdown/native.rb', line 863

def content
  @content
end

#format ⇒ Object (readonly)

Returns the value of attribute format

Returns:

  • (Object) —

    the current value of format



863
864
865
# File 'lib/html_to_markdown/native.rb', line 863

def format
  @format
end

Class Method Details

.from_hash(hash) ⇒ Object



902
903
904
# File 'lib/html_to_markdown/native.rb', line 902

def self.from_hash(hash)
  new(format: hash[:format] || hash["format"], content: hash[:content] || hash["content"])
end

Instance Method Details

#code? ⇒ Boolean

Returns:

  • (Boolean)


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

def code? = false

#definition_item? ⇒ Boolean

Returns:

  • (Boolean)


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

def definition_item? = false

#definition_list? ⇒ Boolean

Returns:

  • (Boolean)


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

def definition_list? = false

#group? ⇒ Boolean

Returns:

  • (Boolean)


898
899
900
# File 'lib/html_to_markdown/native.rb', line 898

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

#heading? ⇒ Boolean

Returns:

  • (Boolean)


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

def heading? = false

#image? ⇒ Boolean

Returns:

  • (Boolean)


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

def image? = false

#list? ⇒ Boolean

Returns:

  • (Boolean)


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

def list? = false

#list_item? ⇒ Boolean

Returns:

  • (Boolean)


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

def list_item? = false

#metadata_block? ⇒ Boolean

Returns:

  • (Boolean)


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

def  = false

#paragraph? ⇒ Boolean

Returns:

  • (Boolean)


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

def paragraph? = false

#quote? ⇒ Boolean

Returns:

  • (Boolean)


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

def quote? = false

#raw_block? ⇒ Boolean

Returns:

  • (Boolean)


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

def raw_block? = true

#table? ⇒ Boolean

Returns:

  • (Boolean)


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

def table? = false