Sha256: d3c934358d1f7799badfad7475776d9bf27bb033b740d58c5d60fb6da6ad8a45
Contents?: true
Size: 596 Bytes
Versions: 14
Compression:
Stored size: 596 Bytes
Contents
module Bmg module Relation class InMemory class Mutable < InMemory def insert(arg) raise ArgumentError unless arg.is_a?(Hash) @operand << arg.dup end def update(updating, predicate = Predicate.tautology) @operand = @operand.map{|t| predicate.call(t) ? t.merge(updating) : t } end def delete(predicate = Predicate.tautology) @operand = @operand.select{|t| predicate.call(t) } end end # class Mutable end # class InMemory end # module Relation end # module Bmg
Version data entries
14 entries across 14 versions & 1 rubygems