class Chivi::Dict
- Chivi::Dict
- Reference
- Object
Included Modules
- Enumerable(Chivi::Dict::Item)
Defined in:
chivi/dict.crConstant Summary
-
EPOCH =
Time.utc(2020, 1, 1)
-
SEP_0 =
"ǁ"
-
SEP_1 =
"¦"
Constructors
Class Method Summary
Instance Method Summary
- #[]=(item : Item)
- #[]?(key)
- #del(key : String, extra : String | Nil = nil)
-
#each(&)
Must yield this collection's elements to the block.
- #file : String
- #find(key : String) : Item | Nil
-
#includes?(key)
Returns
true
if the collection contains obj,false
otherwise. - #load!(file : String = @file) : Dict
- #mtime : Time
- #put(key : String, vals : String | Array(String), extra : String | Nil = nil)
- #put(new_item : Item) : Item | Nil
- #save!(file : String = @file)
- #scan(chars : Array(Char) | String, offset : Int32 = 0)
- #set(key : String, vals : String | Array(String), extra : String | Nil = nil)
-
#size : Int32
Returns the number of elements in the collection.
- #trie : Leaf
Constructor Detail
Class Method Detail
Instance Method Detail
def each(&)
#
Description copied from module Enumerable(Chivi::Dict::Item)
Must yield this collection's elements to the block.
def includes?(key)
#
Description copied from module Enumerable(Chivi::Dict::Item)
Returns true
if the collection contains obj, false
otherwise.
[1, 2, 3].includes?(2) # => true
[1, 2, 3].includes?(5) # => false
def size : Int32
#
Description copied from module Enumerable(Chivi::Dict::Item)
Returns the number of elements in the collection.
[1, 2, 3, 4].size # => 4