Class: Docxi::Word::Hyperlinks

Inherits:
Object
  • Object
show all
Defined in:
lib/docxi/word/hyperlinks.rb,
lib/docxi/word/hyperlinks/hyperlink.rb

Defined Under Namespace

Classes: Hyperlink

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeHyperlinks

Returns a new instance of Hyperlinks.



8
9
10
11
# File 'lib/docxi/word/hyperlinks.rb', line 8

def initialize
  @hyperlinks = []
  @counter = 0
end

Instance Attribute Details

#counterObject

Returns the value of attribute counter.



7
8
9
# File 'lib/docxi/word/hyperlinks.rb', line 7

def counter
  @counter
end

Returns the value of attribute hyperlinks.



7
8
9
# File 'lib/docxi/word/hyperlinks.rb', line 7

def hyperlinks
  @hyperlinks
end

Instance Method Details

#add(hyperlink) ⇒ Object



13
14
15
16
# File 'lib/docxi/word/hyperlinks.rb', line 13

def add(hyperlink)
  @hyperlinks << hyperlink
  hyperlink
end

#render(zip) ⇒ Object



22
23
24
25
26
# File 'lib/docxi/word/hyperlinks.rb', line 22

def render(zip)
  @hyperlinks.each do |hyperlink|
    hyperlink.render(zip)
  end
end

#sequenceObject



18
19
20
# File 'lib/docxi/word/hyperlinks.rb', line 18

def sequence
  @counter += 1
end