Sha256: 22f9c534ee4af167f75f5be4f4e375bf4a732cb46f5193fef45c49f9d3f6dcae
Contents?: true
Size: 379 Bytes
Versions: 15
Compression:
Stored size: 379 Bytes
Contents
require 'cli/kit' module CLI module Kit module Autocall def autocall(const, &block) @autocalls ||= {} @autocalls[const] = block end def const_missing(const) block = begin @autocalls.fetch(const) rescue KeyError return super end const_set(const, block.call) end end end end
Version data entries
15 entries across 15 versions & 2 rubygems