module Lingo::Database::SDBMStore

Constants

MAX_LENGTH

Private Instance Methods

_clear() click to toggle source
# File lib/lingo/database/sdbm_store.rb, line 45
def _clear
  File.delete(*Dir["#{@stofile}{#{EXT.join(',')}}"])
end
_open() click to toggle source
# File lib/lingo/database/sdbm_store.rb, line 49
def _open
  SDBM.open(@stofile)
end
_set(key, val) click to toggle source
Calls superclass method
# File lib/lingo/database/sdbm_store.rb, line 53
def _set(key, val)
  if val.bytesize > MAX_LENGTH
    warn "Warning: Entry `#{key}' (#{@srcfile}) too long for SDBM. Truncating..."
    val = val.byteslice(0, MAX_LENGTH)
  end

  super
end
uptodate?() click to toggle source
Calls superclass method
# File lib/lingo/database/sdbm_store.rb, line 41
def uptodate?
  super(@stofile + EXT.last)
end