Sha256: 41f1b5dc18125a07c1890ad49eb92bdd53d1268039818986f2c97d4aac33e1fd

Contents?: true

Size: 539 Bytes

Versions: 1

Compression:

Stored size: 539 Bytes

Contents

module RR
  module BlankSlate
    class << self
      def call(klass)
        klass.instance_eval do
          instance_methods.each do |unformatted_method_name|
            method_name = unformatted_method_name.to_s
            unless method_name =~ /^_/ || Space.blank_slate_whitelist.any? {|whitelisted_method_name| method_name == whitelisted_method_name}
              alias_method "__blank_slated_#{method_name}", method_name
              undef_method method_name
            end
          end
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rr-0.10.11 lib/rr/blank_slate.rb