Module: Pwnlib::Util::Ruby

Defined in:
lib/pwnlib/util/ruby.rb

Overview

module for some utilities for Ruby metaprogramming.

Class Method Summary collapse

Class Method Details

.private_class_method_blockObject



8
9
10
11
12
13
14
15
16
# File 'lib/pwnlib/util/ruby.rb', line 8

def self.private_class_method_block
  define_singleton_method(:singleton_method_added) do |m|
    private_class_method m
  end
  yield
  class << self
    remove_method(:singleton_method_added)
  end
end