Class: Axlsx::Builder::Title
- Defined in:
- lib/axlsx/builder.rb
Instance Attribute Summary collapse
-
#hyperlink ⇒ Object
Returns the value of attribute hyperlink.
-
#list ⇒ Object
Returns the value of attribute list.
Attributes inherited from Element
#border_thickness, #borders, #comment, #format, #merge, #pos, #text
Instance Method Summary collapse
- #combined_style ⇒ Object
-
#initialize(attrs) ⇒ Title
constructor
A new instance of Title.
Methods inherited from Element
#col, #color, #font, #h_align, #row, #style, #v_align
Constructor Details
#initialize(attrs) ⇒ Title
Returns a new instance of Title.
109 110 111 112 113 114 |
# File 'lib/axlsx/builder.rb', line 109 def initialize attrs h_align = :center # Default v_align = :center # Default attrs.each {|key, val| self.send("#{key.to_s}=", val)} super end |
Instance Attribute Details
#hyperlink ⇒ Object
Returns the value of attribute hyperlink.
107 108 109 |
# File 'lib/axlsx/builder.rb', line 107 def hyperlink @hyperlink end |
#list ⇒ Object
Returns the value of attribute list.
107 108 109 |
# File 'lib/axlsx/builder.rb', line 107 def list @list end |
Instance Method Details
#combined_style ⇒ Object
116 117 118 119 120 121 |
# File 'lib/axlsx/builder.rb', line 116 def combined_style combined_style = super combined_style.merge!(b: true, border: {style: :thick, color: '00000000'}) combined_style.merge!(bg_color: self.color) if self.color combined_style end |