Class: Uniword::Wordprocessingml::Hyperlink
- Inherits:
-
Lutaml::Model::Serializable
- Object
- Lutaml::Model::Serializable
- Uniword::Wordprocessingml::Hyperlink
- Defined in:
- lib/uniword/wordprocessingml/hyperlink.rb
Overview
Hyperlink element
Generated from OOXML schema: wordprocessingml.yml Element: <w:hyperlink>
Instance Method Summary collapse
Instance Method Details
#external? ⇒ Boolean
50 51 52 |
# File 'lib/uniword/wordprocessingml/hyperlink.rb', line 50 def external? !id.nil? && anchor.nil? end |
#internal? ⇒ Boolean
46 47 48 |
# File 'lib/uniword/wordprocessingml/hyperlink.rb', line 46 def internal? !anchor.nil? end |
#target ⇒ Object
30 31 32 |
# File 'lib/uniword/wordprocessingml/hyperlink.rb', line 30 def target anchor ? "##{anchor}" : id end |
#target=(value) ⇒ Object
34 35 36 37 38 39 40 |
# File 'lib/uniword/wordprocessingml/hyperlink.rb', line 34 def target=(value) if value.to_s.start_with?("#") self.anchor = value.sub(/^#/, "") else self.id = value end end |
#url ⇒ Object
42 43 44 |
# File 'lib/uniword/wordprocessingml/hyperlink.rb', line 42 def url id end |