Sha256: 1b2dbc7d01e3565ba7cb7c744c07429f9b3845d9f0061e5f520e5c507eabe7b8
Contents?: true
Size: 486 Bytes
Versions: 15
Compression:
Stored size: 486 Bytes
Contents
module DCell # Global object registry shared among all DCell nodes module Global extend self # Get a global value def get(key) DCell.registry.get_global key.to_s end alias_method :[], :get # Set a global value def set(key, value) DCell.registry.set_global key.to_s, value end alias_method :[]=, :set # Get the keys for all the globals in the system def keys DCell.registry.global_keys.map(&:to_sym) end end end
Version data entries
15 entries across 15 versions & 2 rubygems