Sha256: 6a5a6a77da6cd8f7428e858f9d14c1296336b6f47d2fc9f26a2dac93df93d53f

Contents?: true

Size: 774 Bytes

Versions: 3

Compression:

Stored size: 774 Bytes

Contents

module Xmlss; end
module Xmlss::Element
  class Row

    def self.writer; :row; end

    attr_accessor :style_id, :height, :auto_fit_height, :hidden

    def initialize(attrs={})
      self.style_id = attrs[:style_id]
      self.height = attrs[:height]
      self.auto_fit_height = attrs[:auto_fit_height] || false
      self.hidden = attrs[:hidden] || false
    end

    def height=(value)
      if value && !value.kind_of?(::Numeric)
        raise ArgumentError, "must specify height as a Numeric"
      end
      @height = value && value < 0 ? nil : value
    end

    def autofit;         self.auto_fit_height;         end
    def autofit=(value); self.auto_fit_height = value; end

    def autofit?; !!self.autofit; end
    def hidden?;  !!self.hidden;  end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
xmlss-1.0.1 lib/xmlss/element/row.rb
xmlss-1.0.0 lib/xmlss/element/row.rb
xmlss-1.0.0.rc.4 lib/xmlss/element/row.rb