Class: XlsxKit::Workbook::WorkbookHandler
- Inherits:
-
Object
- Object
- XlsxKit::Workbook::WorkbookHandler
- Defined in:
- lib/xlsxkit/workbook.rb
Overview
Workbook XML SAX Handler
Instance Attribute Summary collapse
-
#sheets ⇒ Object
readonly
Returns the value of attribute sheets.
Instance Method Summary collapse
- #characters(text) ⇒ Object
- #end_element(name) ⇒ Object
-
#initialize ⇒ WorkbookHandler
constructor
A new instance of WorkbookHandler.
- #start_element(name, attrs) ⇒ Object
Constructor Details
#initialize ⇒ WorkbookHandler
Returns a new instance of WorkbookHandler.
243 244 245 246 |
# File 'lib/xlsxkit/workbook.rb', line 243 def initialize @sheets = [] @in_sheet = false end |
Instance Attribute Details
#sheets ⇒ Object (readonly)
Returns the value of attribute sheets.
241 242 243 |
# File 'lib/xlsxkit/workbook.rb', line 241 def sheets @sheets end |
Instance Method Details
#characters(text) ⇒ Object
255 |
# File 'lib/xlsxkit/workbook.rb', line 255 def characters(text); end |
#end_element(name) ⇒ Object
254 |
# File 'lib/xlsxkit/workbook.rb', line 254 def end_element(name); end |
#start_element(name, attrs) ⇒ Object
248 249 250 251 252 |
# File 'lib/xlsxkit/workbook.rb', line 248 def start_element(name, attrs) if name == 'sheet' @sheets << [attrs['name'], attrs['r:id'] || attrs['id']] end end |