Class: Uniword::Wordprocessingml::Hyperlink
- Inherits:
-
Lutaml::Model::Serializable
- Object
- Lutaml::Model::Serializable
- Uniword::Wordprocessingml::Hyperlink
- Includes:
- HasRunPosition
- 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
56 57 58 |
# File 'lib/uniword/wordprocessingml/hyperlink.rb', line 56 def external? !id.nil? && anchor.nil? end |
#internal? ⇒ Boolean
52 53 54 |
# File 'lib/uniword/wordprocessingml/hyperlink.rb', line 52 def internal? !anchor.nil? end |
#target ⇒ Object
36 37 38 |
# File 'lib/uniword/wordprocessingml/hyperlink.rb', line 36 def target anchor ? "##{anchor}" : id end |
#target=(value) ⇒ Object
40 41 42 43 44 45 46 |
# File 'lib/uniword/wordprocessingml/hyperlink.rb', line 40 def target=(value) if value.to_s.start_with?("#") self.anchor = value.sub(/^#/, "") else self.id = value end end |
#url ⇒ Object
48 49 50 |
# File 'lib/uniword/wordprocessingml/hyperlink.rb', line 48 def url id end |