Class: HtmlToMarkdown::NodeContentImage

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

Overview

An image element.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#description ⇒ Object (readonly)

Returns the value of attribute description

Returns:

  • (Object) —

    the current value of description



648
649
650
# File 'lib/html_to_markdown/native.rb', line 648

def description
  @description
end

#image_index ⇒ Object (readonly)

Returns the value of attribute image_index

Returns:

  • (Object) —

    the current value of image_index



648
649
650
# File 'lib/html_to_markdown/native.rb', line 648

def image_index
  @image_index
end

#src ⇒ Object (readonly)

Returns the value of attribute src

Returns:

  • (Object) —

    the current value of src



648
649
650
# File 'lib/html_to_markdown/native.rb', line 648

def src
  @src
end

Class Method Details

.from_hash(hash) ⇒ Object



690
691
692
693
694
695
696
# File 'lib/html_to_markdown/native.rb', line 690

def self.from_hash(hash)
  new(
    description: hash[:description] || hash["description"],
    src: hash[:src] || hash["src"],
    image_index: hash[:image_index] || hash["image_index"]
  )
end

Instance Method Details

#code? ⇒ Boolean

Returns:

  • (Boolean)


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

def code? = false

#definition_item? ⇒ Boolean

Returns:

  • (Boolean)


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

def definition_item? = false

#definition_list? ⇒ Boolean

Returns:

  • (Boolean)


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

def definition_list? = false

#group? ⇒ Boolean

Returns:

  • (Boolean)


686
687
688
# File 'lib/html_to_markdown/native.rb', line 686

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

#heading? ⇒ Boolean

Returns:

  • (Boolean)


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

def heading? = false

#image? ⇒ Boolean

Returns:

  • (Boolean)


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

def image? = true

#list? ⇒ Boolean

Returns:

  • (Boolean)


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

def list? = false

#list_item? ⇒ Boolean

Returns:

  • (Boolean)


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

def list_item? = false

#metadata_block? ⇒ Boolean

Returns:

  • (Boolean)


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

def  = false

#paragraph? ⇒ Boolean

Returns:

  • (Boolean)


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

def paragraph? = false

#quote? ⇒ Boolean

Returns:

  • (Boolean)


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

def quote? = false

#raw_block? ⇒ Boolean

Returns:

  • (Boolean)


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

def raw_block? = false

#table? ⇒ Boolean

Returns:

  • (Boolean)


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

def table? = false