Class: Sketchup::OptionsProvider
- Inherits:
-
Object
- Object
- Sketchup::OptionsProvider
- Includes:
- Enumerable
- Defined in:
- SketchUp/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.
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.
37 38 |
# File 'SketchUp/Sketchup/OptionsProvider.rb', line 37 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.
57 58 |
# File 'SketchUp/Sketchup/OptionsProvider.rb', line 57 def []=(key, value) end |
#add_observer(observer) ⇒ Object
The add_observer method is used to add an observer to the current object.
71 72 |
# File 'SketchUp/Sketchup/OptionsProvider.rb', line 71 def add_observer(observer) end |
#count ⇒ Integer
88 89 |
# File 'SketchUp/Sketchup/OptionsProvider.rb', line 88 def count end |
#each {|key, value| ... } ⇒ nil
The #each method is used to iterate through all of the options.
109 110 |
# File 'SketchUp/Sketchup/OptionsProvider.rb', line 109 def each end |
#each_key {|key| ... } ⇒ nil
The #each_key method is used to iterate through all of the attribute keys.
124 125 |
# File 'SketchUp/Sketchup/OptionsProvider.rb', line 124 def each_key end |
#each_pair {|key, value| ... } ⇒ nil
The #each method is used to iterate through all of the options.
145 146 |
# File 'SketchUp/Sketchup/OptionsProvider.rb', line 145 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.
161 162 |
# File 'SketchUp/Sketchup/OptionsProvider.rb', line 161 def each_value end |
#has_key?(name) ⇒ Boolean
181 182 |
# File 'SketchUp/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.
202 203 |
# File 'SketchUp/Sketchup/OptionsProvider.rb', line 202 def key?(name) end |
#keys ⇒ Object
The keys method is used to retrieve an array with all of the attribute keys.
220 221 |
# File 'SketchUp/Sketchup/OptionsProvider.rb', line 220 def keys end |
#length ⇒ Integer
234 235 |
# File 'SketchUp/Sketchup/OptionsProvider.rb', line 234 def length end |
#name ⇒ Object
The name method is used to retrieve the name of an options provider.
245 246 |
# File 'SketchUp/Sketchup/OptionsProvider.rb', line 245 def name end |
#remove_observer(observer) ⇒ Object
The remove_observer method is used to remove an observer from the current object.
260 261 |
# File 'SketchUp/Sketchup/OptionsProvider.rb', line 260 def remove_observer(observer) end |
#size ⇒ Integer
The #size method is used to retrieve the size (number of elements) of an options provider.
275 276 |
# File 'SketchUp/Sketchup/OptionsProvider.rb', line 275 def size end |