Sha256: 52265239bba7e286871adde75168d145f1db96baee9429bc32a11fdb257eef70

Contents?: true

Size: 655 Bytes

Versions: 3

Compression:

Stored size: 655 Bytes

Contents

require 'osheet/meta_element'
require 'osheet/styled_element'
require 'osheet/format'

module Osheet
  class Column

    include MetaElement
    include StyledElement

    attr_reader :format

    def initialize(width=nil)
      @width   = width
      @autofit = false
      @hidden  = false
      @format  = Format.new(:general)
    end

    def width(value=nil)
      value.nil? ? @width : @width = value
    end

    def autofit(value=nil)
      value.nil? ? @autofit : @autofit = !!value
    end
    def autofit?; @autofit; end

    def hidden(value=nil)
      value.nil? ? @hidden : @hidden = !!value
    end
    def hidden?; @hidden; end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
osheet-1.1.1 lib/osheet/column.rb
osheet-1.1.0 lib/osheet/column.rb
osheet-1.0.0 lib/osheet/column.rb