Class: Layout::AutoTextDefinitions
| Relationships | |
| Super Chains via Extension / Inclusion / Inheritance | |
|
Instance Chain:
self,
Enumerable
|
|
| Inherits: | Object |
Overview
The AutoTextDefinitions class is a container class for all
AutoTextDefinitions in a Document.
Instance Method Summary
-
#[](index) ⇒ Layout::AutoTextDefinition
The #[] method returns a value from the array of
AutoTextDefinitions. -
#add(name, type) ⇒ Layout::AutoTextDefinition
The #add method adds an
AutoTextDefinitionto theDocument. -
#each {|auto_text| ... }
The #each method iterates through all of the
AutoTextDefinitions. -
#index(auto_text) ⇒ Integer?
The #index method returns the index of the
AutoTextDefinition, ornilif it doesn't exist in theDocument. -
#length ⇒ Integer
(also: #size)
The #length method returns the number of
AutoTextDefinitions. -
#remove(definition, convert_tags_to_text = true)
The #remove method removes an
AutoTextDefinitionfrom theDocument. -
#size
Alias for #length.
Instance Method Details
#[](index) ⇒ Layout::AutoTextDefinition
#[](name) ⇒ Layout::AutoTextDefinition
The #[] method returns a value from the array of
AutoTextDefinitions.
#add(name, type) ⇒ Layout::AutoTextDefinition
The #add method adds an 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| ... }
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 AutoTextDefinitions.
#index(auto_text) ⇒ Integer?
#index(name) ⇒ Integer?
Integer?
#index(name) ⇒ Integer?
The #index method returns the index of the AutoTextDefinition,
or nil if it doesn't exist in the Document.
#length ⇒ Integer
Also known as: #size
The #length method returns the number of AutoTextDefinitions.
#remove(definition, convert_tags_to_text = true)
#remove(name, convert_tags_to_text = true)
#remove(index, convert_tags_to_text = true)
The #remove method removes an AutoTextDefinition from the
Document.
The 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+]
#size
Alias for #length.