Class: Layout::AutoTextDefinitions
- Inherits:
-
Object
- Object
- Layout::AutoTextDefinitions
- Includes:
- Enumerable
- Defined in:
- lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinitions.rb
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.
49 50 |
# File 'lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinitions.rb', line 49 def [](index) end |
#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
79 80 |
# File 'lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinitions.rb', line 79 def add(name, type) end |
#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.
99 100 |
# File 'lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinitions.rb', line 99 def each end |
#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.
122 123 |
# File 'lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinitions.rb', line 122 def index(auto_text) end |
#length ⇒ Integer Also known as: size
The #length method returns the number of Layout::AutoTextDefinitions.
135 136 |
# File 'lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinitions.rb', line 135 def length end |
#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
176 177 |
# File 'lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinitions.rb', line 176 def remove(*args) end |