Sha256: 3ce75f5ed884431d20d51e0449192429985bbb0883dda7d0a72cf357342e059f

Contents?: true

Size: 944 Bytes

Versions: 6

Compression:

Stored size: 944 Bytes

Contents

require 'xmlss/style/base'

module Xmlss::Style

  class Border

    def self.writer; :border; end

    include Enumeration

    enum :position, {
      :left => "Left",
      :top => "Top",
      :right => "Right",
      :bottom => "Bottom",
      :diagonal_left => "DiagonalLeft",
      :diagonal_right => "DiagonalRight"
    }

    enum :weight, {
      :hairline => 0,
      :thin => 1,
      :medium => 2,
      :thick => 3
    }

    enum :line_style, {
      :none => "None",
      :continuous => "Continuous",
      :dash => "Dash",
      :dot => "Dot",
      :dash_dot => "DashDot",
      :dash_dot_dot => "DashDotDot"
    }

    attr_accessor :color

    def initialize(attrs={})
      self.color = attrs[:color]
      self.position = attrs[:position]
      self.weight = attrs[:weight] || :thin
      self.line_style = attrs[:line_style] || :continuous
    end

  end

  class Borders

    def self.writer; :borders; end

  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
xmlss-1.0.1 lib/xmlss/style/border.rb
xmlss-1.0.0 lib/xmlss/style/border.rb
xmlss-1.0.0.rc.4 lib/xmlss/style/border.rb
xmlss-1.0.0.rc.3 lib/xmlss/style/border.rb
xmlss-1.0.0.rc.2 lib/xmlss/style/border.rb
xmlss-1.0.0.rc.1 lib/xmlss/style/border.rb