diff options
| author | Randy Morgan <[email protected]> | 2011-11-26 13:20:57 +0900 |
|---|---|---|
| committer | Randy Morgan <[email protected]> | 2011-11-26 13:20:57 +0900 |
| commit | 11303a4d6664d9a7ff7bc408035d2ab70378a375 (patch) | |
| tree | 51c675ae3ab8cd6c1afd7087145261b1eb2ec54c /lib/axlsx/stylesheet/border.rb | |
| parent | 044afe5a35db42cefce4f18a0fecc3da90cab1b5 (diff) | |
| download | caxlsx-11303a4d6664d9a7ff7bc408035d2ab70378a375.tar.gz caxlsx-11303a4d6664d9a7ff7bc408035d2ab70378a375.zip | |
adding in support for ruby 1.9.3
release version 1.0.9
Diffstat (limited to 'lib/axlsx/stylesheet/border.rb')
| -rw-r--r-- | lib/axlsx/stylesheet/border.rb | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/axlsx/stylesheet/border.rb b/lib/axlsx/stylesheet/border.rb index 167b42c9..73a873e5 100644 --- a/lib/axlsx/stylesheet/border.rb +++ b/lib/axlsx/stylesheet/border.rb @@ -3,13 +3,13 @@ module Axlsx class Border # @return [Boolean] The diagonal up property for the border that indicates if the border should include a diagonal line from the bottom left to the top right of the cell. - attr_accessor :diagonalUp + attr_reader :diagonalUp # @return [Boolean] The diagonal down property for the border that indicates if the border should include a diagonal line from the top left to the top right of the cell. - attr_accessor :diagonalDown + attr_reader :diagonalDown # @return [Boolean] The outline property for the border indicating that top, left, right and bottom borders should only be applied to the outside border of a range of cells. - attr_accessor :outline + attr_reader :outline # @return [SimpleTypedList] A list of BorderPr objects for this border. attr_reader :prs @@ -35,8 +35,11 @@ module Axlsx end end + # @see diagonalUp def diagonalUp=(v) Axlsx::validate_boolean v; @diagonalUp = v end + # @see diagonalDown def diagonalDown=(v) Axlsx::validate_boolean v; @diagonalDown = v end + # @see outline def outline=(v) Axlsx::validate_boolean v; @outline = v end # Serializes the border element @@ -44,7 +47,9 @@ module Axlsx 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) } + @prs.select { |pr| pr.name == k }.each do |part| + part.to_xml(xml) + end end } end |
