Description

class Axlsx::SimpleTypedList

A SimpleTypedList is a type restrictive collection that allows some of the methods from Array and supports basic xml serialization.

Creats a new typed list

Parameters:

  • type (Array, Class)

    An array of Class objects or a single Class object

  • serialize_as (String) (defaults to: nil)

    The tag name to use in serialization

Raises:

  • (ArgumentError)

    if all members of type are not Class objects

join operator one of the allowed types

Parameters:

  • v (Array)

    the array to join

Raises:

  • (ArgumentError)

    if any of the values being joined are not

Concat operator

Parameters:

  • v (Any)

    the data to be added

Raises:

  • (ArgumentError)

    if the value being added is not one fo the allowed types

positional assignment. Adds the item at the index specified

Parameters:

  • index (Integer)
  • v (Any)

Raises:

  • (ArgumentError)

    if the index is protected by locking

  • (ArgumentError)

    if the item is not one of the allowed types

The class constants of allowed types

delete the item from the list

Parameters:

  • v (Any)

    The item to be deleted.

Raises:

  • (ArgumentError)

    if the item's index is protected by locking

delete the item from the list at the index position provided

Raises:

  • (ArgumentError)

    if the index is protected by locking

inserts an item at the index specfied

Parameters:

  • index (Integer)
  • v (Any)

Raises:

  • (ArgumentError)

    if the index is protected by locking

  • (ArgumentError)

    if the index is not one of the allowed types

Lock this list at the current size

The index below which items cannot be removed

determines if the index is protected

Parameters:

  • index (Integer)

The tag name to use when serializing this object by default the parent node for all items in the list is the classname of the first allowed type with the first letter in lowercase.

Transposes the list (without blowing up like ruby does) any non populated cell in the matrix will be a nil value

Yields:

  • (column_index, row_index)

Unlock the list

SimpleTypedList is referenced in 0 repositories