Class: XlsxWriter::HeaderFooter::HF
- Inherits:
-
Object
- Object
- XlsxWriter::HeaderFooter::HF
- Defined in:
- lib/xlsx_writer/header_footer.rb
Defined Under Namespace
Classes: LCR
Instance Attribute Summary collapse
-
#center ⇒ Object
readonly
Returns the value of attribute center.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#left ⇒ Object
readonly
Returns the value of attribute left.
-
#right ⇒ Object
readonly
Returns the value of attribute right.
-
#tag ⇒ Object
readonly
Returns the value of attribute tag.
Instance Method Summary collapse
- #has_image? ⇒ Boolean
-
#initialize(id, tag) ⇒ HF
constructor
A new instance of HF.
- #parts ⇒ Object
- #to_xml ⇒ Object
Constructor Details
Instance Attribute Details
#center ⇒ Object (readonly)
Returns the value of attribute center.
27 28 29 |
# File 'lib/xlsx_writer/header_footer.rb', line 27 def center @center end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
24 25 26 |
# File 'lib/xlsx_writer/header_footer.rb', line 24 def id @id end |
#left ⇒ Object (readonly)
Returns the value of attribute left.
26 27 28 |
# File 'lib/xlsx_writer/header_footer.rb', line 26 def left @left end |
#right ⇒ Object (readonly)
Returns the value of attribute right.
28 29 30 |
# File 'lib/xlsx_writer/header_footer.rb', line 28 def right @right end |
#tag ⇒ Object (readonly)
Returns the value of attribute tag.
25 26 27 |
# File 'lib/xlsx_writer/header_footer.rb', line 25 def tag @tag end |
Instance Method Details
#has_image? ⇒ Boolean
46 47 48 |
# File 'lib/xlsx_writer/header_footer.rb', line 46 def has_image? parts.any?(&:has_image?) end |
#parts ⇒ Object
42 43 44 |
# File 'lib/xlsx_writer/header_footer.rb', line 42 def parts [left,center,right].select(&:present?) end |
#to_xml ⇒ Object
38 39 40 |
# File 'lib/xlsx_writer/header_footer.rb', line 38 def to_xml %{<#{tag}>#{parts.map(&:code).join}</#{tag}>} end |