Class: Sketchup::OptionsProvider
| Relationships | |
| Super Chains via Extension / Inclusion / Inheritance | |
| Instance Chain: 
          self,
          Enumerable
         | |
| Inherits: | Object | 
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
- 
    
      #[](index)  ⇒ 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 
    
  
Object 
      #[](name)  ⇒ 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.
Creates a new attribute for the given key if needed.
    #add_observer(observer)  ⇒ Object 
  
The add_observer method is used to add an observer to the current object.
    #count  ⇒ Integer 
  
Since SketchUp 2014 the count method is inherited from Ruby’s Enumerable mix-in module. Prior to that the #count method is an alias for #length.
    #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 
  
The #has_key? method is an alias for #key?.
    #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 
  
The #length method is an alias of #size.
    #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.