class Docxi::Word::Contents::Paragraph::Hyperlink
Attributes
id[RW]
link[RW]
text[RW]
Public Class Methods
new(text, link, id )
click to toggle source
# File lib/docxi/word/contents/paragraph.rb, line 36 def initialize(text, link, id ) @text = text @link = link @id = id end
Public Instance Methods
content_type()
click to toggle source
# File lib/docxi/word/contents/paragraph.rb, line 42 def content_type "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" end
render(xml)
click to toggle source
# File lib/docxi/word/contents/paragraph.rb, line 46 def render(xml) xml['w'].pPr do xml['w'].pStyle('w:val' => "Normal") xml['w'].rPr do xml['w'].rStyle('w:val' => "InternetLink") end end xml['w'].hyperlink('r:id' => @id) do xml['w'].r do xml['w'].rPr do xml['w'].rStyle( 'w:val' => "InternetLink") end xml['w'].t @text end end end