Class: Sketchup::Set Deprecated
| Relationships | |
| Inherits: | Object |
Overview
In SketchUp 2014 this class was changed from Set to Set in order to avoid conflict with the Ruby Standard Library. The Set class is deprecated and new extensions should make use of Ruby’s Set class unless they need backward compatibility.
The set class represents a collection of unique objects. This class is useful for keeping track of a group of related entities, kind of like a selection set that stays around for as long as you need it to.
To make a set of your own, create an empty one using Set.new, and then add items to it.
Instance Attribute Summary
-
#empty? ⇒ Boolean
readonly
The empty? method is used to determine whether the set is empty.
Instance Method Summary
-
#clear ⇒ Object
The clear method is used to clear all objects out of the set.
-
#contains?(entity) ⇒ Boolean
The #contains? method is an alias for #include?.
-
#delete(object) ⇒ Object
The delete object is used to delete or remove an object from the set.
-
#each {|item| ... }
The each method is used to iterate through all of the objects in the set.
-
#include?(entity) ⇒ Boolean
The #include? method is used to determine if the set includes a particular object.
-
#insert(object) ⇒ Object
The insert method is used to insert an object into the set.
- #length ⇒ Integer
-
#size ⇒ Integer
The #size method is used to determine the number of objects in the set.
-
#to_a ⇒ Object
The to_a method is used to get an
::Arrayof the entities in yourSet.
Instance Attribute Details
#empty? ⇒ Boolean (readonly)
The empty? method is used to determine whether the set is empty.
Instance Method Details
#clear ⇒ Object
The clear method is used to clear all objects out of the set.
#contains?(entity) ⇒ Boolean
The #contains? method is an alias for #include?.
#delete(object) ⇒ Object
The delete object is used to delete or remove an object from the set.
#each {|item| ... }
The each method is used to iterate through all of the objects in the set.
#include?(entity) ⇒ Boolean
The #include? method is used to determine if the set includes a particular object.
#insert(object) ⇒ Object
The insert method is used to insert an object into the set.
#length ⇒ Integer
The #length method is an alias for #size.
#size ⇒ Integer
The #size method is used to determine the number of objects in the set.
#to_a ⇒ Object
The to_a method is used to get an ::Array of the entities in your Set.