diff options
| author | Randy Morgan <[email protected]> | 2013-09-29 13:14:53 +0900 |
|---|---|---|
| committer | Randy Morgan <[email protected]> | 2013-09-29 13:14:53 +0900 |
| commit | 097b7da7eb6b29907da28c174e83ff22a6358176 (patch) | |
| tree | 152f5bf7c0a85568eb1beb230290d397cc103af0 /lib/axlsx/workbook/workbook_views.rb | |
| parent | 90fcca29df390de244e2b16ef0279fd373482981 (diff) | |
| download | caxlsx-097b7da7eb6b29907da28c174e83ff22a6358176.tar.gz caxlsx-097b7da7eb6b29907da28c174e83ff22a6358176.zip | |
Added workbook views collection and workbook view object
Diffstat (limited to 'lib/axlsx/workbook/workbook_views.rb')
| -rw-r--r-- | lib/axlsx/workbook/workbook_views.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/axlsx/workbook/workbook_views.rb b/lib/axlsx/workbook/workbook_views.rb new file mode 100644 index 00000000..4e69f19e --- /dev/null +++ b/lib/axlsx/workbook/workbook_views.rb @@ -0,0 +1,22 @@ +module Axlsx + # a simple types list of BookView objects + class WorkbookViews < SimpleTypedList + + # creates the book views object + def initialize + super WorkbookView + end + + # Serialize to xml + # @param [String] str + # @return [String] + def to_xml_string(str = '') + return if @list.empty? + str << "<bookViews>" + each { |view| view.to_xml_string(str) } + str << '</bookViews>' + end + end +end + + |
