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



974
975
976
# File 'lib/html_to_markdown/native.rb', line 974

def title
  @title
end

#urlObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



974
975
976
# File 'lib/html_to_markdown/native.rb', line 974

def url
  @url
end

Class Method Details

.from_hash(hash) ⇒ Object



1015
1016
1017
# File 'lib/html_to_markdown/native.rb', line 1015

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

Instance Method Details

#bold?Boolean

Returns:

  • (Boolean)


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

def bold? = false

#code?Boolean

Returns:

  • (Boolean)


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

def code? = false

#highlight?Boolean

Returns:

  • (Boolean)


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

def highlight? = false

#italic?Boolean

Returns:

  • (Boolean)


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

def italic? = false

#link?Boolean

Returns:

  • (Boolean)


1011
1012
1013
# File 'lib/html_to_markdown/native.rb', line 1011

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

#strikethrough?Boolean

Returns:

  • (Boolean)


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

def strikethrough? = false

#subscript?Boolean

Returns:

  • (Boolean)


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

def subscript? = false

#superscript?Boolean

Returns:

  • (Boolean)


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

def superscript? = false

#underline?Boolean

Returns:

  • (Boolean)


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

def underline? = false