Method: Flyweight#register!
- Defined in:
- lib/exegesis/flyweight.rb
#register!(instance) ⇒ Object
Register an instance in the flyweight. Throw an error if the key is already used.
37 38 39 40 |
# File 'lib/exegesis/flyweight.rb', line 37 def register!(instance) raise AlreadyRegisteredError if has_key?(instance) register(instance) end |