Class: Sketchup::Set Deprecated
- Inherits:
-
Object
- Object
- Sketchup::Set
- Defined in:
- SketchUp/Sketchup/Set.rb
Overview
In SketchUp 2014 this class was changed from Set to Sketchup::Set in order to avoid conflict with the Ruby Standard Library. The Sketchup::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 Sketchup::Set.new, and then add items to it.
Instance Method Summary collapse
-
#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| ... } ⇒ Object
The each method is used to iterate through all of the objects in the set.
-
#empty? ⇒ Boolean
The empty? method is used to determine whether the set is empty.
-
#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 Array of the entities in your Set.
Instance Method Details
#clear ⇒ Object
The clear method is used to clear all objects out of the set.
56 57 |
# File 'SketchUp/Sketchup/Set.rb', line 56 def clear end |
#contains?(entity) ⇒ Boolean
The #contains? method is an alias for #include?.
77 78 |
# File 'SketchUp/Sketchup/Set.rb', line 77 def contains?(entity) end |
#delete(object) ⇒ Object
The delete object is used to delete or remove an object from the set.
94 95 |
# File 'SketchUp/Sketchup/Set.rb', line 94 def delete(object) end |
#each {|item| ... } ⇒ Object
The each method is used to iterate through all of the objects in the set.
109 110 |
# File 'SketchUp/Sketchup/Set.rb', line 109 def each end |
#empty? ⇒ Boolean
The empty? method is used to determine whether the set is empty.
127 128 |
# File 'SketchUp/Sketchup/Set.rb', line 127 def empty? end |
#include?(entity) ⇒ Boolean
The #include? method is used to determine if the set includes a particular object.
149 150 |
# File 'SketchUp/Sketchup/Set.rb', line 149 def include?(entity) end |
#insert(object) ⇒ Object
The insert method is used to insert an object into the set.
166 167 |
# File 'SketchUp/Sketchup/Set.rb', line 166 def insert(object) end |
#length ⇒ Integer
183 184 |
# File 'SketchUp/Sketchup/Set.rb', line 183 def length end |
#size ⇒ Integer
The #size method is used to determine the number of objects in the set.
200 201 |
# File 'SketchUp/Sketchup/Set.rb', line 200 def size end |
#to_a ⇒ Object
The to_a method is used to get an Array of the entities in your Set.
215 216 |
# File 'SketchUp/Sketchup/Set.rb', line 215 def to_a end |