Class: Karasuba::FooterAppender

Inherits:
Object
  • Object
show all
Defined in:
lib/karasuba/footer_appender.rb

Overview

A footer should look like this : <div title=“a-footer-id”>

</br>
<hr style="margin: 15px 0px;"/>
<p display="color:#878888;">
  Lorem ipsum<br/>
  Lauren hipsum
</p>

</div>

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(append_point) ⇒ FooterAppender

Returns a new instance of FooterAppender.



14
15
16
# File 'lib/karasuba/footer_appender.rb', line 14

def initialize(append_point)
  @append_point = append_point
end

Instance Attribute Details

#append_pointObject (readonly)

Returns the value of attribute append_point.



12
13
14
# File 'lib/karasuba/footer_appender.rb', line 12

def append_point
  @append_point
end

Instance Method Details



18
19
20
21
22
23
24
# File 'lib/karasuba/footer_appender.rb', line 18

def append_footer(xml_text = '', options = {})
  hr         = horizontal_rule(options)
  p          = paragraph(text_nodes(xml_text), options)
  div        = division(hr, p, options)
  append_point.next = div
  div
end

#documentObject



26
27
28
# File 'lib/karasuba/footer_appender.rb', line 26

def document
  append_point.document
end