class Direct::Group

Attributes

map[R]

Public Class Methods

new() click to toggle source
# File lib/direct/group.rb, line 4
def initialize
  @map = Concurrent::Map.new{|collection, key|
    collection.put(key, Concurrent::Array.new)
  }
end

Public Instance Methods

empty?() click to toggle source
# File lib/direct/group.rb, line 26
def empty?
  map.empty?
end
fetch(key) click to toggle source
# File lib/direct/group.rb, line 18
def fetch(key)
  map.fetch(key)
end
inspect() click to toggle source
# File lib/direct/group.rb, line 30
def inspect
  map.keys.inspect
end
key?(key) click to toggle source
# File lib/direct/group.rb, line 22
def key?(key)
  map.key?(key)
end
store(key, callable=nil, &block) click to toggle source
# File lib/direct/group.rb, line 13
def store(key, callable=nil, &block)
  map[key] << (callable || block)
  self
end