Module: AxlsxEnhanced::Helpers::Injections::Workbook
- Included in:
- Axlsx::Workbook
- Defined in:
- lib/axlsx_enhanced/helpers/injections/workbook.rb
Instance Method Summary collapse
Instance Method Details
#smart_add_worksheet(options) {|worksheet| ... } ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/axlsx_enhanced/helpers/injections/workbook.rb', line 5 def smart_add_worksheet() # Create the worksheet worksheet = self.add_worksheet() # Assign smart styles if any is given, and clean options hash worksheet.smart_styles = [:smart_styles] || AxlsxEnhanced::Helpers::Styles.defaults .delete(:smart_styles) # Perform a block yield if necessary yield worksheet if block_given? worksheet end |