Class: Tins::NamedSet
Overview
NamedSet extends Ruby’s Set class to include a descriptive name.
This class provides all the functionality of Ruby’s standard Set while adding a named identifier that can be useful for debugging, logging, and identification purposes. The name is stored as an instance variable and can be accessed or modified through the ‘name` accessor.
Instance Attribute Summary collapse
-
#name ⇒ String
Gets or sets the name of this NamedSet.
Instance Method Summary collapse
-
#initialize(name) ⇒ NamedSet
constructor
Initializes a new NamedSet with the given name.
Constructor Details
#initialize(name) ⇒ NamedSet
Initializes a new NamedSet with the given name.
22 23 24 25 |
# File 'lib/tins/named_set.rb', line 22 def initialize(name) @name = name super() end |
Instance Attribute Details
#name ⇒ String
Gets or sets the name of this NamedSet.
30 31 32 |
# File 'lib/tins/named_set.rb', line 30 def name @name end |