Class: HtmlToMarkdown::AnnotationKindLink
- Inherits:
-
Data
- Object
- Data
- HtmlToMarkdown::AnnotationKindLink
- 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
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Class Method Summary collapse
Instance Method Summary collapse
- #bold? ⇒ Boolean
- #code? ⇒ Boolean
- #highlight? ⇒ Boolean
- #italic? ⇒ Boolean
- #link? ⇒ Boolean
- #strikethrough? ⇒ Boolean
- #subscript? ⇒ Boolean
- #superscript? ⇒ Boolean
- #underline? ⇒ Boolean
Instance Attribute Details
#title ⇒ Object (readonly)
Returns the value of attribute 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
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
365 |
# File 'lib/html_to_markdown/native.rb', line 365 def bold? = false |
#code? ⇒ Boolean
373 |
# File 'lib/html_to_markdown/native.rb', line 373 def code? = false |
#highlight? ⇒ Boolean
379 |
# File 'lib/html_to_markdown/native.rb', line 379 def highlight? = false |
#italic? ⇒ Boolean
367 |
# File 'lib/html_to_markdown/native.rb', line 367 def italic? = false |
#link? ⇒ 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
371 |
# File 'lib/html_to_markdown/native.rb', line 371 def strikethrough? = false |
#subscript? ⇒ Boolean
375 |
# File 'lib/html_to_markdown/native.rb', line 375 def subscript? = false |
#superscript? ⇒ Boolean
377 |
# File 'lib/html_to_markdown/native.rb', line 377 def superscript? = false |
#underline? ⇒ Boolean
369 |
# File 'lib/html_to_markdown/native.rb', line 369 def underline? = false |