Class: Irc::Bot::Registry::DBMAccessor
- Inherits:
-
AbstractAccessor
- Object
- AbstractAccessor
- Irc::Bot::Registry::DBMAccessor
- Defined in:
- /home/apoc/projects/ruby/rbot/lib/rbot/registry/dbm.rb
Instance Attribute Summary
Attributes inherited from AbstractAccessor
Instance Method Summary (collapse)
Methods inherited from AbstractAccessor
#[], #[]=, #clear, #close, #create_folders, #default, #delete, #each, #each_key, #each_value, #flush, get_impl, #has_key?, #has_value?, #index, #initialize, #keys, #length, #optimize, #restore, #set_default, #store, #sub_registry, #to_a, #to_hash, #values
Constructor Details
This class inherits a constructor from Irc::Bot::Registry::AbstractAccessor
Instance Method Details
- (Boolean) dbexists?
26 27 28 |
# File '/home/apoc/projects/ruby/rbot/lib/rbot/registry/dbm.rb', line 26 def dbexists? not Dir.glob(@filename + '.*').empty? end |
- (Object) registry
21 22 23 24 |
# File '/home/apoc/projects/ruby/rbot/lib/rbot/registry/dbm.rb', line 21 def registry super @registry ||= DBM.open(@filename, 0666, DBM::WRCREAT) end |