Class: Rufus::Tokyo::Dystopia::Words

Tokyo Dystopia words database.

http://tokyocabinet.sourceforge.net/dystopiadoc/

Constructor Summary

public initialize(path, opts = {})

TODO : continue me

Opens/create a Tokyo Dystopia words database.

[View source]


42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/rufus/tokyo/dystopia/words.rb', line 42

def initialize (path, opts={})

  # tcwdb.h :
  #
  #   enum {                 /* enumeration for open modes */
  #     WDBOREADER = 1 << 0, /* open as a reader */
  #     WDBOWRITER = 1 << 1, /* open as a writer */
  #     WDBOCREAT = 1 << 2,  /* writer creating */
  #     WDBOTRUNC = 1 << 3,  /* writer truncating */
  #     WDBONOLCK = 1 << 4,  /* open without locking */
  #     WDBOLCKNB = 1 << 5   /* lock without blocking */
  #   };

  mode = 0

  @db = dlib.tcwdbnew

  (dlib.tcwdbopen(@db, path, mode) == 1) || raise_error
end
Generated on Friday, September 18 2009 at 10:35:43 AM by YARD 0.2.3.5 (ruby-1.8.7).