Sha256: 5b95047725efbbac824292802b05cff7c51267e38b5f83a157258b5f618b208e
Contents?: true
Size: 699 Bytes
Versions: 1
Compression:
Stored size: 699 Bytes
Contents
require "night_vision/version" module NightVision DIVIDER = "------------------------------------------------" def self.goggles(*classes) classes.each do |klass| klass.instance_methods.each do |method| m = klass.instance_method(method) klass.send(:define_method, method) do |*args, &block| puts DIVIDER puts "Invoking #{m.owner}##{method}" puts "Actual arguments are: #{args}" puts DIVIDER val = m.bind(self).(*args, &block) puts DIVIDER puts "Returning from #{m.owner}##{method}" puts "Return value is: #{val}" puts DIVIDER val end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
night_vision-0.1.0 | lib/night_vision.rb |