Class: Sketchup::OptionsProvider
- Inherits:
-
Object
- Object
- Sketchup::OptionsProvider
- Includes:
- Enumerable
- Defined in:
- lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb
Overview
An OptionsProvider
class provides various kinds of options on a Model. You get an OptionsProvider
from the OptionsManager. The options are given as name/value pairs.
List of keys added in different SketchUp versions:
UnitsOptions
-
AreaUnit
(SketchUp 2019.2) -
VolumeUnit
(SketchUp 2019.2) -
AreaPrecision
(SketchUp 2020.0) -
VolumePrecision
(SketchUp 2020.0)
-
The AreaUnit
and VolumeUnit
options in UnitsOptions
only applies if the UnitFormat
is Length::Decimal
.
Instance Method Summary collapse
-
#[](arg) ⇒ Object
The [] method is used to get a value by name or index of the key.
-
#[]=(key, value) ⇒ Object
The []= method is used to set the value of a specific key.
-
#add_observer(observer) ⇒ Object
The add_observer method is used to add an observer to the current object.
- #count ⇒ Integer
-
#each {|key, value| ... } ⇒ nil
The #each method is used to iterate through all of the options.
-
#each_key {|key| ... } ⇒ nil
The #each_key method is used to iterate through all of the attribute keys.
-
#each_pair {|key, value| ... } ⇒ nil
The #each method is used to iterate through all of the options.
-
#each_value {|value| ... } ⇒ Object
The each_value method is used to iterate through all of the attribute values.
- #has_key?(name) ⇒ Boolean
-
#key?(name) ⇒ Boolean
The #key? method is used to determine if the options provider has a specific key.
-
#keys ⇒ Object
The keys method is used to retrieve an array with all of the attribute keys.
- #length ⇒ Integer
-
#name ⇒ Object
The name method is used to retrieve the name of an options provider.
-
#remove_observer(observer) ⇒ Object
The remove_observer method is used to remove an observer from the current object.
-
#size ⇒ Integer
The #size method is used to retrieve the size (number of elements) of an options provider.
Instance Method Details
#[](index) ⇒ Object #[](name) ⇒ Object
The [] method is used to get a value by name or index of the key.
47 48 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb', line 47 def [](arg) end |
#[]=(key, value) ⇒ Object
The []= method is used to set the value of a specific key.
Creates a new attribute for the given key if needed.
67 68 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb', line 67 def []=(key, value) end |
#add_observer(observer) ⇒ Object
The add_observer method is used to add an observer to the current object.
81 82 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb', line 81 def add_observer(observer) end |
#count ⇒ Integer
98 99 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb', line 98 def count end |
#each {|key, value| ... } ⇒ nil
The #each method is used to iterate through all of the options.
119 120 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb', line 119 def each end |
#each_key {|key| ... } ⇒ nil
The #each_key method is used to iterate through all of the attribute keys.
134 135 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb', line 134 def each_key end |
#each_pair {|key, value| ... } ⇒ nil
The #each method is used to iterate through all of the options.
155 156 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb', line 155 def each_pair end |
#each_value {|value| ... } ⇒ Object
The each_value method is used to iterate through all of the attribute values.
Throws an exception if there are no keys.
171 172 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb', line 171 def each_value end |
#has_key?(name) ⇒ Boolean
189 190 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb', line 189 def has_key?(name) end |
#key?(name) ⇒ Boolean
The #key? method is used to determine if the options provider has a specific key.
208 209 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb', line 208 def key?(name) end |
#keys ⇒ Object
The keys method is used to retrieve an array with all of the attribute keys.
226 227 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb', line 226 def keys end |
#length ⇒ Integer
240 241 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb', line 240 def length end |
#name ⇒ Object
The name method is used to retrieve the name of an options provider.
251 252 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb', line 251 def name end |
#remove_observer(observer) ⇒ Object
The remove_observer method is used to remove an observer from the current object.
266 267 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb', line 266 def remove_observer(observer) end |
#size ⇒ Integer
The #size method is used to retrieve the size (number of elements) of an options provider.
281 282 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb', line 281 def size end |