Sha256: 786622a27063a9c64d21a7343f2877ad1dfe4e12df0e1c7a7feb286ff550f8b2
Contents?: true
Size: 600 Bytes
Versions: 9
Compression:
Stored size: 600 Bytes
Contents
module Cockpit class Settings module Global def self.included(base) base.extend ClassMethods end module ClassMethods def [](key) global[key] end def []=(key, value) global[key] = value end end end end def self.Settings(*args) case args.length when 0 Cockpit::Settings.global when 1 case args.first when Hash else Cockpit::Settings[args.first] end when 2 Cockpit::Settings[args.first] = args.last end end end
Version data entries
9 entries across 9 versions & 1 rubygems