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

#descriptionObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



277
278
279
# File 'lib/html_to_markdown/native.rb', line 277

def description
  @description
end

#image_indexObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



277
278
279
# File 'lib/html_to_markdown/native.rb', line 277

def image_index
  @image_index
end

#srcObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



277
278
279
# File 'lib/html_to_markdown/native.rb', line 277

def src
  @src
end

Class Method Details

.from_hash(hash) ⇒ Object



319
320
321
# File 'lib/html_to_markdown/native.rb', line 319

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)


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

def code? = false

#definition_item?Boolean

Returns:

  • (Boolean)


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

def definition_item? = false

#definition_list?Boolean

Returns:

  • (Boolean)


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

def definition_list? = false

#group?Boolean

Returns:

  • (Boolean)


315
316
317
# File 'lib/html_to_markdown/native.rb', line 315

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

#heading?Boolean

Returns:

  • (Boolean)


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

def heading? = false

#image?Boolean

Returns:

  • (Boolean)


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

def image? = true

#list?Boolean

Returns:

  • (Boolean)


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

def list? = false

#list_item?Boolean

Returns:

  • (Boolean)


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

def list_item? = false

#metadata_block?Boolean

Returns:

  • (Boolean)


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

def  = false

#paragraph?Boolean

Returns:

  • (Boolean)


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

def paragraph? = false

#quote?Boolean

Returns:

  • (Boolean)


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

def quote? = false

#raw_block?Boolean

Returns:

  • (Boolean)


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

def raw_block? = false

#table?Boolean

Returns:

  • (Boolean)


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

def table? = false