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



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

def title
  @title
end

#urlObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



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

def url
  @url
end

Class Method Details

.from_hash(hash) ⇒ Object



988
989
990
# File 'lib/html_to_markdown/native.rb', line 988

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

Instance Method Details

#bold?Boolean

Returns:

  • (Boolean)


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

def bold? = false

#code?Boolean

Returns:

  • (Boolean)


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

def code? = false

#highlight?Boolean

Returns:

  • (Boolean)


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

def highlight? = false

#italic?Boolean

Returns:

  • (Boolean)


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

def italic? = false

#link?Boolean

Returns:

  • (Boolean)


984
985
986
# File 'lib/html_to_markdown/native.rb', line 984

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

#strikethrough?Boolean

Returns:

  • (Boolean)


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

def strikethrough? = false

#subscript?Boolean

Returns:

  • (Boolean)


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

def subscript? = false

#superscript?Boolean

Returns:

  • (Boolean)


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

def superscript? = false

#underline?Boolean

Returns:

  • (Boolean)


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

def underline? = false