delete code, untested

This commit is contained in:
2022-12-11 21:30:25 +02:00
parent fd86f0531c
commit 4a6960efe1
14 changed files with 823 additions and 749 deletions

View File

@ -0,0 +1,16 @@
require "active_hash"
module ActiveHash
Base.class_eval do
def self.delete(id) # only works with id's
@record_index.delete(id.to_s)
@records.delete_if{|record| record[:id] == id.to_i}
true
end
def the_private_records
@records
end
end
end