Sha256: a41c73221fe5c0178d7e107252384d8b047f7523f86690705ab541f90abf76f8
Contents?: true
Size: 844 Bytes
Versions: 6
Compression:
Stored size: 844 Bytes
Contents
module Axlsx class Border attr_accessor :diagonalUp, :diagonalDown, :outline attr_reader :prs def initialize(options={}) @prs = SimpleTypedList.new BorderPr options.each do |o| self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}=" end end def diagonalUp=(v) Axlsx::validate_boolean v; @diagonalUp = v end def diagonalDown=(v) Axlsx::validate_boolean v; @diagonalDown = v end def outline=(v) Axlsx::validate_boolean v; @outline = v end def to_xml(xml) xml.border(self.instance_values.select{ |k,v| [:diagonalUp, :diagonalDown, :outline].include? k }) { [:start, :end, :left, :right, :top, :bottom, :diagonal, :vertical, :horizontal].each do |k| @prs.select { |pr| pr.name == k }.each { |pr| pr.to_xml(xml) } end } end end end
Version data entries
6 entries across 6 versions & 1 rubygems