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



328
329
330
# File 'lib/html_to_markdown/native.rb', line 328

def description
  @description
end

#image_indexObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



328
329
330
# File 'lib/html_to_markdown/native.rb', line 328

def image_index
  @image_index
end

#srcObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



328
329
330
# File 'lib/html_to_markdown/native.rb', line 328

def src
  @src
end

Class Method Details

.from_hash(hash) ⇒ Object



373
374
375
376
377
378
379
# File 'lib/html_to_markdown/native.rb', line 373

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)


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

def code? = false

#definition_item?Boolean

Returns:

  • (Boolean)


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

def definition_item? = false

#definition_list?Boolean

Returns:

  • (Boolean)


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

def definition_list? = false

#group?Boolean

Returns:

  • (Boolean)


369
370
371
# File 'lib/html_to_markdown/native.rb', line 369

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

#heading?Boolean

Returns:

  • (Boolean)


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

def heading? = false

#image?Boolean

Returns:

  • (Boolean)


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

def image? = true

#list?Boolean

Returns:

  • (Boolean)


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

def list? = false

#list_item?Boolean

Returns:

  • (Boolean)


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

def list_item? = false

#metadata_block?Boolean

Returns:

  • (Boolean)


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

def  = false

#paragraph?Boolean

Returns:

  • (Boolean)


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

def paragraph? = false

#quote?Boolean

Returns:

  • (Boolean)


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

def quote? = false

#raw_block?Boolean

Returns:

  • (Boolean)


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

def raw_block? = false

#table?Boolean

Returns:

  • (Boolean)


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

def table? = false