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



892
893
894
# File 'lib/html_to_markdown/native.rb', line 892

def title
  @title
end

#urlObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



892
893
894
# File 'lib/html_to_markdown/native.rb', line 892

def url
  @url
end

Class Method Details

.from_hash(hash) ⇒ Object



931
932
933
# File 'lib/html_to_markdown/native.rb', line 931

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

Instance Method Details

#bold?Boolean

Returns:

  • (Boolean)


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

def bold? = false

#code?Boolean

Returns:

  • (Boolean)


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

def code? = false

#highlight?Boolean

Returns:

  • (Boolean)


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

def highlight? = false

#italic?Boolean

Returns:

  • (Boolean)


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

def italic? = false

#link?Boolean

Returns:

  • (Boolean)


927
928
929
# File 'lib/html_to_markdown/native.rb', line 927

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

#strikethrough?Boolean

Returns:

  • (Boolean)


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

def strikethrough? = false

#subscript?Boolean

Returns:

  • (Boolean)


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

def subscript? = false

#superscript?Boolean

Returns:

  • (Boolean)


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

def superscript? = false

#underline?Boolean

Returns:

  • (Boolean)


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

def underline? = false