Sha256: 6517917edcc4ad9ff0b93569a95502ec6a26a19c64d4d15b4115713f3e88f635

Contents?: true

Size: 281 Bytes

Versions: 1

Compression:

Stored size: 281 Bytes

Contents

module BlankSlate
  def BlankSlate(klass, &block)
    blank_slate = Class.new(klass, &block)
    blank_slate.class_eval do
      (klass.instance_methods(false) - instance_methods(false)).each do |meth|
        define_method(meth){ nil }
      end
    end
    blank_slate
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
blank_slate-1.1.2 lib/blank_slate.rb