Module: Caller
- Defined in:
- lib/caller.rb,
lib/caller/version.rb
Constant Summary collapse
- VERSION =
'0.1.0'
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.extended(base) ⇒ Object
12 13 14 |
# File 'lib/caller.rb', line 12 def self.extended(base) base.caller_for :call end |
Instance Method Details
#caller_for(*callers_methods) ⇒ Object
4 5 6 7 8 9 10 |
# 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 |