Class: ReadXls::WorkbookBuilder
- Inherits:
-
Object
- Object
- ReadXls::WorkbookBuilder
- Defined in:
- lib/read_xls/workbook_builder.rb
Instance Attribute Summary collapse
-
#biff ⇒ Object
Returns the value of attribute biff.
-
#extended_formats ⇒ Object
Returns the value of attribute extended_formats.
-
#formats ⇒ Object
Returns the value of attribute formats.
-
#sst ⇒ Object
Returns the value of attribute sst.
-
#worksheet_builders ⇒ Object
Returns the value of attribute worksheet_builders.
Instance Method Summary collapse
- #add_extended_format(extended_format) ⇒ Object
- #add_format(format_index, format_string) ⇒ Object
- #add_worksheet_builder(worksheet_builder) ⇒ Object
- #build ⇒ Object
-
#initialize(biff) ⇒ WorkbookBuilder
constructor
A new instance of WorkbookBuilder.
Constructor Details
#initialize(biff) ⇒ WorkbookBuilder
Returns a new instance of WorkbookBuilder.
5 6 7 8 9 10 |
# File 'lib/read_xls/workbook_builder.rb', line 5 def initialize(biff) self.biff = biff self.worksheet_builders = [] self.formats = default_formats self.extended_formats = [] end |
Instance Attribute Details
#biff ⇒ Object
Returns the value of attribute biff.
3 4 5 |
# File 'lib/read_xls/workbook_builder.rb', line 3 def biff @biff end |
#extended_formats ⇒ Object
Returns the value of attribute extended_formats.
3 4 5 |
# File 'lib/read_xls/workbook_builder.rb', line 3 def extended_formats @extended_formats end |
#formats ⇒ Object
Returns the value of attribute formats.
3 4 5 |
# File 'lib/read_xls/workbook_builder.rb', line 3 def formats @formats end |
#sst ⇒ Object
Returns the value of attribute sst.
3 4 5 |
# File 'lib/read_xls/workbook_builder.rb', line 3 def sst @sst end |
#worksheet_builders ⇒ Object
Returns the value of attribute worksheet_builders.
3 4 5 |
# File 'lib/read_xls/workbook_builder.rb', line 3 def worksheet_builders @worksheet_builders end |
Instance Method Details
#add_extended_format(extended_format) ⇒ Object
20 21 22 |
# File 'lib/read_xls/workbook_builder.rb', line 20 def add_extended_format(extended_format) self.extended_formats.push(extended_format) end |
#add_format(format_index, format_string) ⇒ Object
16 17 18 |
# File 'lib/read_xls/workbook_builder.rb', line 16 def add_format(format_index, format_string) self.formats[format_index] = format_string end |
#add_worksheet_builder(worksheet_builder) ⇒ Object
12 13 14 |
# File 'lib/read_xls/workbook_builder.rb', line 12 def add_worksheet_builder(worksheet_builder) self.worksheet_builders.push(worksheet_builder) end |