module Caller

Constants

VERSION

Public Class Methods

extended(base) click to toggle source
# File lib/caller.rb, line 12
def self.extended(base)
  base.caller_for :call
end

Public Instance Methods

caller_for(*callers_methods) click to toggle source
# File lib/caller.rb, line 4
def caller_for(*callers_methods)
  callers_methods.each do |method|
    define_singleton_method method do |*args, &block|
      new.send(method, *args, &block)
    end
  end
end