Module: Rufus::Tokyo::TyrantCommons

#stat and #compte_ext_opts, that’s all.

Public Visibility

Public Instance Method Summary

#compute_ext_opts(opts)

Computes the :int option for the "ext" function (triggering tyrant embedded lua functions).

#stat

Returns a hash of information about the Tokyo Tyrant database (or table) at the other end of the connection.

Public Instance Method Details

compute_ext_opts

public compute_ext_opts(opts)

Computes the :int option for the "ext" function (triggering tyrant embedded lua functions)

[View source]


49
50
51
52
53
54
55
# File 'lib/rufus/tokyo/ttcommons.rb', line 49

def compute_ext_opts (opts)

  r = 0
  r = r | 1 if opts[:record_locking]
  r = r | 2 if opts[:global_locking]
  r
end

stat

public stat

Returns a hash of information about the Tokyo Tyrant database (or table) at the other end of the connection.

[View source]


37
38
39
40
41
42
43
44
# File 'lib/rufus/tokyo/ttcommons.rb', line 37

def stat

  do_stat.split("\n").inject({}) { |r, l|
    kv = l.split("\t")
    r[kv.first] = kv.last
    r
  }
end
Generated on Friday, September 18 2009 at 10:35:42 AM by YARD 0.2.3.5 (ruby-1.8.7).