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

#titleObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



919
920
921
# File 'lib/html_to_markdown/native.rb', line 919

def title
  @title
end

#urlObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



919
920
921
# File 'lib/html_to_markdown/native.rb', line 919

def url
  @url
end

Class Method Details

.from_hash(hash) ⇒ Object



958
959
960
# File 'lib/html_to_markdown/native.rb', line 958

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

Instance Method Details

#bold?Boolean

Returns:

  • (Boolean)


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

def bold? = false

#code?Boolean

Returns:

  • (Boolean)


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

def code? = false

#highlight?Boolean

Returns:

  • (Boolean)


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

def highlight? = false

#italic?Boolean

Returns:

  • (Boolean)


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

def italic? = false

#link?Boolean

Returns:

  • (Boolean)


954
955
956
# File 'lib/html_to_markdown/native.rb', line 954

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

#strikethrough?Boolean

Returns:

  • (Boolean)


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

def strikethrough? = false

#subscript?Boolean

Returns:

  • (Boolean)


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

def subscript? = false

#superscript?Boolean

Returns:

  • (Boolean)


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

def superscript? = false

#underline?Boolean

Returns:

  • (Boolean)


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

def underline? = false