class RubyXL::OOXMLContainerObject

that obscures the top-level container, allowing direct access to the contents as Array.
<fonts><font>...</font><font>...</font></fonts>
Parent class for OOXML conainer objects (for example,

def before_write_xml

def before_write_xml
  true
end

def define_count_attribute

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

def get_node_object(child_node_params)

def get_node_object(child_node_params)
  if child_node_params[:is_array] then self
  else super
  end
end

def init_child_nodes(params)

def init_child_nodes(params)
  obtain_class_variable(:@@ooxml_child_nodes).each_value { |v|
    next if v[:is_array] # Only one collection node allowed per OOXMLContainerObject, and it is contained in itself.
    instance_variable_set("@#{v[:accessor]}", params[v[:accessor]])
  }
end

def initialize(params = {})

def initialize(params = {})
  array_content = params.delete(:_)
  super
  array_content.each_with_index { |v, i| self[i] = v } if array_content
end

def inspect

def inspect
  vars = [ super ]
  vars = self.instance_variables.each { |v| vars << "#{v}=#{instance_variable_get(v).inspect}" }
  "<#{self.class}: #{super} #{vars.join(", ")}>"
end