class RedisServiceManager::NodeHash
- RedisServiceManager::NodeHash
- Reference
- Object
Included Modules
- Enumerable({String, String})
- Iterable({String, String})
Defined in:
redis_service_manager/node_hash.crConstructors
Instance Method Summary
- #[](key, & : String -> String)
- #[](key)
- #[]=(status_name, json_value)
- #[]?(key)
- #clear
- #delete(key, &)
- #delete(key)
- #each(*args, **options)
- #each(*args, **options, &)
-
#empty?
Returns
true
ifself
does not contain any element. - #fetch(key, &)
- #fetch(key, default)
- #hash_key : String
- #keys
- #redis : Redis::Client
-
#size
Returns the number of elements in the collection.
-
#to_h : Hash(String, String)
Creates a
Hash
out of an Enumerable where each element is a 2 element structure (for instance aTuple
or anArray
). - #values
Constructor Detail
Instance Method Detail
def empty?
#
Description copied from module Enumerable({String, String})
Returns true
if self
does not contain any element.
([] of Int32).empty? # => true
([1]).empty? # => false
[nil, false].empty? # => false
#present?
returns the inverse.
def size
#
Description copied from module Enumerable({String, String})
Returns the number of elements in the collection.
[1, 2, 3, 4].size # => 4
def to_h : Hash(String, String)
#
Description copied from module Enumerable({String, String})
Creates a Hash
out of an Enumerable where each element is a
2 element structure (for instance a Tuple
or an Array
).
[[:a, :b], [:c, :d]].to_h # => {:a => :b, :c => :d}
Tuple.new({:a, 1}, {:c, 2}).to_h # => {:a => 1, :c => 2}