Sha256: 21786ca209d4c6efffeb386cc25503e29af181bb4116e14e2ea58be4d57aaff4
Contents?: true
Size: 274 Bytes
Versions: 1
Compression:
Stored size: 274 Bytes
Contents
module BlankSlate def BlankSlate(klass, &block) blank_slate = Class.new(&block) blank_slate.class_eval do klass.instance_methods(false).each do |meth| define_method(meth){ nil } unless method_defined?(meth) end end blank_slate end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
blank_slate-1.0.0 | lib/blank_slate.rb |