Class: Me::Registry::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/me/registry.rb

Direct Known Subclasses

ProcessScoped, ThreadScoped

Class Method Summary collapse

Class Method Details

.def_registry_readers(*names) ⇒ Object



32
33
34
35
36
37
38
39
# File 'lib/me/registry.rb', line 32

def self.def_registry_readers(*names)
  names.each do |name|
    attr_reader(name)
    define_method(:"register_#{name}") do |value|
      instance_variable_set(:"@#{name}", value)
    end
  end
end