Class: HtmlToMarkdown::NodeContentCode

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

Overview

A code block or inline code.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#language ⇒ Object (readonly)

Returns the value of attribute language

Returns:

  • (Object) —

    the current value of language



699
700
701
# File 'lib/html_to_markdown/native.rb', line 699

def language
  @language
end

#text ⇒ Object (readonly)

Returns the value of attribute text

Returns:

  • (Object) —

    the current value of text



699
700
701
# File 'lib/html_to_markdown/native.rb', line 699

def text
  @text
end

Class Method Details

.from_hash(hash) ⇒ Object



738
739
740
# File 'lib/html_to_markdown/native.rb', line 738

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

Instance Method Details

#code? ⇒ Boolean

Returns:

  • (Boolean)


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

def code? = true

#definition_item? ⇒ Boolean

Returns:

  • (Boolean)


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

def definition_item? = false

#definition_list? ⇒ Boolean

Returns:

  • (Boolean)


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

def definition_list? = false

#group? ⇒ Boolean

Returns:

  • (Boolean)


734
735
736
# File 'lib/html_to_markdown/native.rb', line 734

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

#heading? ⇒ Boolean

Returns:

  • (Boolean)


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

def heading? = false

#image? ⇒ Boolean

Returns:

  • (Boolean)


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

def image? = false

#list? ⇒ Boolean

Returns:

  • (Boolean)


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

def list? = false

#list_item? ⇒ Boolean

Returns:

  • (Boolean)


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

def list_item? = false

#metadata_block? ⇒ Boolean

Returns:

  • (Boolean)


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

def  = false

#paragraph? ⇒ Boolean

Returns:

  • (Boolean)


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

def paragraph? = false

#quote? ⇒ Boolean

Returns:

  • (Boolean)


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

def quote? = false

#raw_block? ⇒ Boolean

Returns:

  • (Boolean)


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

def raw_block? = false

#table? ⇒ Boolean

Returns:

  • (Boolean)


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

def table? = false