Sha256: f794e894a2893409a615ccafce80df2ebf3ec11123accdb06033398c7c69e0b7
Contents?: true
Size: 333 Bytes
Versions: 10
Compression:
Stored size: 333 Bytes
Contents
module Marvin::IRC::Server class NamedStore def self.new(key_plural, ref_value, &blk) klass = Class.new(Hash) do alias_method :"each_#{ref_value}", :each_value alias_method key_plural.to_sym, :keys end klass.class_eval(&blk) unless blk.blank? return klass.new end end end
Version data entries
10 entries across 10 versions & 1 rubygems