Class: RubyXL::OOXMLContainerObject
- Inherits:
-
Array
- Object
- Array
- RubyXL::OOXMLContainerObject
- Includes:
- OOXMLObjectInstanceMethods
- Defined in:
- lib/rubyXL/objects/ooxml_object.rb
Overview
Parent class for OOXML conainer objects (for example, <fonts><font>...</font><font>...</font></fonts>
that obscures the top-level container, allowing direct access to the contents as Array
.
Direct Known Subclasses
Authors, Borders, BreakList, CT_ConnectionSiteList, CT_DashStopList, CT_EffectStyleList, CT_GeomGuideList, CT_GradientStopList, CT_LineStyleList, CT_Path2DCubicBezierTo, CT_Path2DList, CT_Path2DQuadBezierTo, CT_Path2DTo, CT_TextTabStopList, CellSmartTags, CellStyleXFs, CellStyles, CellWatches, CellXFs, ColumnRanges, CommentList, CustomColorList, CustomFilters, CustomProperties, CustomSheetViews, CustomWorkbookViews, DXFs, DataConsolidationReferences, DataValidations, DefinedNames, DefinedNamesExt, EmbeddedControls, ExternalReferences, ExtraColorSchemeList, Fills, Fonts, FunctionGroups, Hyperlinks, IgnoredErrors, IndexedColors, MRUColors, MergedCells, NumberFormats, OLEObjects, PivotCaches, PivotReferences, ProtectedRanges, Scenario, Scenarios, SheetDataSet, SheetNames, Sheets, SmartTagTypes, SmartTags, TableParts, TableStyles, WebPublishObjects, WebPublishingItems, WorkbookViews, WorksheetViews
Instance Attribute Summary
Attributes included from OOXMLObjectInstanceMethods
Class Method Summary collapse
Instance Method Summary collapse
- #before_write_xml ⇒ Object
-
#initialize(params = {}) ⇒ OOXMLContainerObject
constructor
A new instance of OOXMLContainerObject.
- #inspect ⇒ Object
Methods included from OOXMLObjectInstanceMethods
#==, included, #index_in_collection, #write_xml
Constructor Details
#initialize(params = {}) ⇒ OOXMLContainerObject
Returns a new instance of OOXMLContainerObject.
368 369 370 371 372 |
# File 'lib/rubyXL/objects/ooxml_object.rb', line 368 def initialize(params = {}) array_content = params.delete(:_) super array_content.each_with_index { |v, i| self[i] = v } if array_content end |
Class Method Details
.define_count_attribute ⇒ Object
400 401 402 403 |
# File 'lib/rubyXL/objects/ooxml_object.rb', line 400 def define_count_attribute # Count will be inherited from Array. so no need to define it explicitly. define_attribute(:count, :uint, :required => true, :computed => true) end |
Instance Method Details
#before_write_xml ⇒ Object
389 390 391 |
# File 'lib/rubyXL/objects/ooxml_object.rb', line 389 def before_write_xml true end |
#inspect ⇒ Object
393 394 395 396 397 |
# File 'lib/rubyXL/objects/ooxml_object.rb', line 393 def inspect vars = [ super ] vars = self.instance_variables.each { |v| vars << "#{v}=#{instance_variable_get(v).inspect}" } "<#{self.class}: #{super} #{vars.join(", ")}>" end |