Sha256: 46b0fbc5c3c8449db6ba9eccf10220045d80d58f31febaad0ba0544ad85d042b
Contents?: true
Size: 675 Bytes
Versions: 15
Compression:
Stored size: 675 Bytes
Contents
# module CloudSesame # module Domain # class Context # attr_reader :table # def initialize(table = {}) # @table = table # end # def [](key, find_or_create = false) # table[key] ||= default_value(find_or_create) # end # def []=(key, value) # table[key] = value # end # def delete(key) # table.delete key # end # def each(&block) # table.each &block # end # def map(&block) # table.map &block # end # private # def default_value(data) # data != true ? data : Context.new if data # end # end # end # end
Version data entries
15 entries across 15 versions & 1 rubygems