Sha256: ad650525b746b37b7e0921061a954fb560cd30057dc536fc2553d998957dd53b
Contents?: true
Size: 573 Bytes
Versions: 20
Compression:
Stored size: 573 Bytes
Contents
module Usable # Keep track of "used" modules and their "available" methods # Mixin for Config module ConfigRegister def available_methods modules.each_with_object(Hash.new(Null.instance_method(:default_method))) do |mod, result| mod.instance_methods.each do |method_name| result[method_name] = mod.instance_method method_name end end end def add_module(mod) modules << mod end def modules @modules ||= [] end module Null def default_method(*, &_block) end end end end
Version data entries
20 entries across 20 versions & 1 rubygems