Class: Docxer::Word::Footers

Inherits:
Object
  • Object
show all
Defined in:
lib/docxer/word/footers.rb,
lib/docxer/word/footers/footer.rb

Defined Under Namespace

Classes: Footer

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeFooters

Returns a new instance of Footers.



8
9
10
11
# File 'lib/docxer/word/footers.rb', line 8

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

Instance Attribute Details

#counterObject

Returns the value of attribute counter.



7
8
9
# File 'lib/docxer/word/footers.rb', line 7

def counter
  @counter
end

#footersObject

Returns the value of attribute footers.



7
8
9
# File 'lib/docxer/word/footers.rb', line 7

def footers
  @footers
end

Instance Method Details

#add(footer) ⇒ Object



13
14
15
16
# File 'lib/docxer/word/footers.rb', line 13

def add(footer)
  @footers << footer
  footer
end

#render(zip) ⇒ Object



22
23
24
25
26
# File 'lib/docxer/word/footers.rb', line 22

def render(zip)
  @footers.each do |footer|
    footer.render(zip)
  end
end

#sequenceObject



18
19
20
# File 'lib/docxer/word/footers.rb', line 18

def sequence
  @counter += 1
end