Class: HtmlToMarkdown::AnnotationKindLink

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

Overview

A hyperlink sourced from an <a href="..."> element.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#title ⇒ Object (readonly)

Returns the value of attribute title

Returns:

  • (Object) —

    the current value of title



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

def title
  @title
end

#url ⇒ Object (readonly)

Returns the value of attribute url

Returns:

  • (Object) —

    the current value of url



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

def url
  @url
end

Class Method Details

.from_hash(hash) ⇒ Object



385
386
387
# File 'lib/html_to_markdown/native.rb', line 385

def self.from_hash(hash)
  new(url: hash[:url] || hash["url"], title: hash[:title] || hash["title"])
end

Instance Method Details

#bold? ⇒ Boolean

Returns:

  • (Boolean)


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

def bold? = false

#code? ⇒ Boolean

Returns:

  • (Boolean)


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

def code? = false

#highlight? ⇒ Boolean

Returns:

  • (Boolean)


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

def highlight? = false

#italic? ⇒ Boolean

Returns:

  • (Boolean)


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

def italic? = false

#link? ⇒ Boolean

Returns:

  • (Boolean)


381
382
383
# File 'lib/html_to_markdown/native.rb', line 381

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

#strikethrough? ⇒ Boolean

Returns:

  • (Boolean)


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

def strikethrough? = false

#subscript? ⇒ Boolean

Returns:

  • (Boolean)


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

def subscript? = false

#superscript? ⇒ Boolean

Returns:

  • (Boolean)


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

def superscript? = false

#underline? ⇒ Boolean

Returns:

  • (Boolean)


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

def underline? = false