class Docxi::Word::Hyperlinks::Hyperlink::Hyperlink

Attributes

text[RW]

Public Class Methods

new(text, link ) click to toggle source
# File lib/docxi/word/hyperlinks/hyperlink.rb, line 49
def initialize(text, link )
  @text = text
  @link = link
end

Public Instance Methods

content_type() click to toggle source
# File lib/docxi/word/hyperlinks/hyperlink.rb, line 54
def content_type
  "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink"
end
render(xml) click to toggle source
# File lib/docxi/word/hyperlinks/hyperlink.rb, line 58
def render(xml)
  xml['w'].hyperlink('w:id' => '1') do 
    xml['w'].r do
      xml['w'].pPr do
        xml['w'].rStyle( 'w:val' => "InternetLink")
      end
      xml['w'].t @text
    end
  end
end