Module: ReturnSpy::Decorator::InstanceMethod

Defined in:
lib/return_spy/decorator.rb

Class Method Summary collapse

Class Method Details

.decorate(target, name, new_name, &blk) ⇒ Object



4
5
6
7
8
9
# File 'lib/return_spy/decorator.rb', line 4

def self.decorate(target, name, new_name, &blk)
  target.class_eval do
    alias_method(new_name, name)
    define_method(name, &blk)
  end
end