Module: Axlsx::OptionsParser
- Included in:
- AbstractContentType, App, Axis, Border, BorderPr, Break, Cell, CellAlignment, CellProtection, CellStyle, Cfvo, Chart, Col, Color, Comment, ConditionalFormatting, ConditionalFormattingRule, DLbls, DataBar, DataValidation, DefinedName, Dxf, FilterColumn, Filters, Filters::DateGroupItem, Font, GradientFill, HeaderFooter, Hyperlink, IconSet, Marker, NumData, NumDataSource, NumFmt, OneCellAnchor, Package, PageMargins, PageSetUpPr, PageSetup, Pane, PatternFill, Pic, PictureLocking, PivotTable, PivotTableCacheDefinition, PrintOptions, ProtectedRange, Scaling, ScatterChart, Selection, Series, SheetCalcPr, SheetFormatPr, SheetPr, SheetProtection, SheetView, StrData, StrVal, Table, TableStyle, TableStyleElement, TableStyleInfo, TwoCellAnchor, View3D, VmlShape, Worksheet, WorksheetHyperlink, Xf
- Defined in:
- lib/axlsx/util/options_parser.rb
Overview
This module defines a single method for parsing options in class initializers.
Instance Method Summary collapse
-
#parse_options(options = {}) ⇒ Object
Parses an options hash by calling any defined method by the same name of the key postfixed with an '='.
Instance Method Details
#parse_options(options = {}) ⇒ Object
Parses an options hash by calling any defined method by the same name of the key postfixed with an '='
9 10 11 12 13 |
# File 'lib/axlsx/util/options_parser.rb', line 9 def (={}) .each do |key, value| self.send("#{key}=", value) if self.respond_to?("#{key}=") && value != nil end end |