class MemDB::Entries
Public Class Methods
new()
click to toggle source
# File lib/mem_db.rb, line 20 def initialize @entries = [] end
Public Instance Methods
[](id)
click to toggle source
# File lib/mem_db.rb, line 24 def [](id) @entries[id] end
add(matching, value)
click to toggle source
# File lib/mem_db.rb, line 28 def add(matching, value) id = @entries.length entry = Entry.new(id, matching, value) @entries.push(entry) id end