Class: Layout::AutoTextDefinitions
- Inherits:
-
Object
- Object
- Layout::AutoTextDefinitions
- Includes:
- Enumerable
Overview
The AutoTextDefinitions class is a container class for all AutoTextDefinitions in a Document.
Instance Method Summary # collapse
-
#[](index) ⇒ Object
The #[] method returns a value from the array of AutoTextDefinitions.
-
#add(name, type) ⇒ Layout::AutoTextDefinition
The #add method adds an AutoTextDefinition to the Document.
-
#each {|auto_text| ... } ⇒ Object
The #each method iterates through all of the AutoTextDefinitions.
-
#index(auto_text) ⇒ Object
The #index method returns the index of the AutoTextDefinition, or
nil
if it doesn't exist in the Document. -
#length ⇒ Integer
(also: #size)
The #length method returns the number of AutoTextDefinitions.
-
#remove(*args) ⇒ Object
The #remove method removes an AutoTextDefinition from the Document.
Instance Method Details
↑ #[](index) ⇒ Layout::AutoTextDefinition #[](name) ⇒ Layout::AutoTextDefinition
The #[] method returns a value from the array of Layout::AutoTextDefinitions.
↑ #add(name, type) ⇒ Layout::AutoTextDefinition
The #add method adds an Layout::AutoTextDefinition to the Document.
The type can be one of the following values:
Layout::AutoTextDefinition::TYPE_FILE
Layout::AutoTextDefinition::TYPE_PAGE_NAME
Layout::AutoTextDefinition::TYPE_PAGE_NUMBER
Layout::AutoTextDefinition::TYPE_CUSTOM_TEXT
Layout::AutoTextDefinition::TYPE_DATE_CURRENT
Layout::AutoTextDefinition::TYPE_DATE_CREATED
Layout::AutoTextDefinition::TYPE_DATE_MODIFIED
Layout::AutoTextDefinition::TYPE_DATE_PUBLISHED
Layout::AutoTextDefinition::TYPE_PAGE_COUNT
Layout::AutoTextDefinition::TYPE_SEQUENCE
↑ #each {|auto_text| ... } ⇒ Object
Don't remove content from this collection while iterating over it with #each. This would change the size of the collection and cause elements to be skipped as the indices change. Instead copy the current collection to an array using to_a
and then use each
on the array, when removing content.
The #each method iterates through all of the Layout::AutoTextDefinitions.
↑ #index(auto_text) ⇒ Integer? #index(name) ⇒ Integer?
The #index method returns the index of the Layout::AutoTextDefinition, or nil
if it doesn't exist in the Document.
↑ #length ⇒ Integer Also known as: size
The #length method returns the number of Layout::AutoTextDefinitions.
↑ #remove(definition, convert_tags_to_text = true) ⇒ Object #remove(name, convert_tags_to_text = true) ⇒ Object #remove(index, convert_tags_to_text = true) ⇒ Object
The #remove method removes an Layout::AutoTextDefinition from the Document.
The Layout::AutoTextDefinition must be one of the following types:
Layout::AutoTextDefinition::TYPE_FILE
Layout::AutoTextDefinition::TYPE_PAGE_NAME
Layout::AutoTextDefinition::TYPE_PAGE_NUMBER
Layout::AutoTextDefinition::TYPE_CUSTOM_TEXT
Layout::AutoTextDefinition::TYPE_DATE_CURRENT
Layout::AutoTextDefinition::TYPE_DATE_CREATED
Layout::AutoTextDefinition::TYPE_DATE_MODIFIED
Layout::AutoTextDefinition::TYPE_DATE_PUBLISHED
Layout::AutoTextDefinition::TYPE_PAGE_COUNT
Layout::AutoTextDefinition::TYPE_SEQUENCE