class RIMS::DB::Message
Public Instance Methods
add_msg(msg_id, text)
click to toggle source
# File lib/rims/db.rb, line 700 def add_msg(msg_id, text) put_str(msg_id.to_s, text) self end
del_msg(msg_id)
click to toggle source
# File lib/rims/db.rb, line 705 def del_msg(msg_id) @kvs.delete(msg_id.to_s) or raise "not found a message text for id: #{msg_id}" self end
each_msg_id() { |to_i| ... }
click to toggle source
# File lib/rims/db.rb, line 710 def each_msg_id return enum_for(:each_msg_id) unless block_given? @kvs.each_key do |msg_id| yield(msg_id.to_i) end self end
msg_exist?(msg_id)
click to toggle source
# File lib/rims/db.rb, line 722 def msg_exist?(msg_id) @kvs.key? msg_id.to_s end
msg_text(msg_id)
click to toggle source
# File lib/rims/db.rb, line 718 def msg_text(msg_id) get_str(msg_id.to_s) end