Module: Axlsx::OptionsParser
- Included in:
- AbstractContentType, App, Axis, Border, BorderPr, Break, BubbleChart, 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, RichTextRun, Scaling, ScatterChart, Selection, Series, SheetCalcPr, SheetFormatPr, SheetPr, SheetProtection, SheetView, StrData, StrVal, Table, TableStyle, TableStyleElement, TableStyleInfo, TwoCellAnchor, View3D, VmlShape, WorkbookView, 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 14 |
# File 'lib/axlsx/util/options_parser.rb', line 9 def (={}) .each do |key, value| key = :"#{key}=" self.send(key, value) if !value.nil? && self.respond_to?(key) end end |