Sha256: ae32d0ae554dab7b74799b124f0ad4b26b157e25f68c86d0efda7a9e587ea61a
Contents?: true
Size: 781 Bytes
Versions: 5
Compression:
Stored size: 781 Bytes
Contents
class XlsxWriter class PageSetup DEFAULT = { :top => 1.0, :right => 0.75, :bottom => 1.0, :left => 0.75, :header => 0.5, :footer => 0.5, :orientation => 'landscape', :vertical_dpi => 4294967292, :horizontal_dpi => 4294967292 } DEFAULT.keys.each do |attr| attr_writer attr define_method attr do instance_variable_get(:"@#{attr}") || DEFAULT[attr] end end def to_xml %{<pageMargins left="#{left}" right="#{right}" top="#{top}" bottom="#{bottom}" header="#{header}" footer="#{footer}"/><pageSetup orientation="#{orientation}" horizontalDpi="#{horizontal_dpi}" verticalDpi="#{vertical_dpi}"/>} end end end
Version data entries
5 entries across 5 versions & 1 rubygems