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| ... } ⇒ nil
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.
117 118 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb', line 117 def each end |
#each_key {|key| ... } ⇒ nil
The #each_key method is used to iterate through all of the attribute keys.
130 131 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb', line 130 def each_key end |
#each_pair {|key, value| ... } ⇒ nil
The #each method is used to iterate through all of the options.
149 150 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb', line 149 def each_pair end |
#each_value {|value| ... } ⇒ nil
The #each_value method is used to iterate through all of the attribute values.
163 164 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb', line 163 def each_value end |
#has_key?(name) ⇒ Boolean
181 182 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb', line 181 def has_key?(name) end |
#key?(name) ⇒ Boolean
The #key? method is used to determine if the options provider has a specific key.
200 201 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb', line 200 def key?(name) end |
#keys ⇒ Object
The #keys method is used to retrieve an array with all of the attribute keys.
213 214 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb', line 213 def keys end |
#length ⇒ Integer
227 228 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb', line 227 def length end |
#name ⇒ Object
The name method is used to retrieve the name of an options provider.
238 239 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb', line 238 def name end |
#remove_observer(observer) ⇒ Object
The remove_observer method is used to remove an observer from the current object.
253 254 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb', line 253 def remove_observer(observer) end |
#size ⇒ Integer
The #size method is used to retrieve the size (number of elements) of an options provider.
268 269 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb', line 268 def size end |