Class: Toys::UniqueKey
- Inherits:
-
Object
- Object
- Toys::UniqueKey
- Defined in:
- core-docs/toys/unique_key.rb
Overview
A named unique key, useful for Context keys or sentinels.
Each individual instance of this class is unique and not equal to any other instance, even if they have the same user-visible name.
Defined in the toys-core gem
Instance Method Summary collapse
-
#initialize(name = nil) ⇒ UniqueKey
constructor
Create a new UniqueKey.
-
#inspect ⇒ String
A user-visible name of this key.
-
#to_s ⇒ String
A user-visible name of this key.
Constructor Details
#initialize(name = nil) ⇒ UniqueKey
Create a new UniqueKey.
17 18 19 |
# File 'core-docs/toys/unique_key.rb', line 17 def initialize(name = nil) # Source available in the toys-core gem end |
Instance Method Details
#inspect ⇒ String
Returns a user-visible name of this key.
31 32 33 |
# File 'core-docs/toys/unique_key.rb', line 31 def inspect # Source available in the toys-core gem end |
#to_s ⇒ String
Returns a user-visible name of this key.
24 25 26 |
# File 'core-docs/toys/unique_key.rb', line 24 def to_s # Source available in the toys-core gem end |