Class: Module

Inherits:
Object show all
Defined in:
lib/pik/contrib/zip/stdrubyext.rb

Overview

:nodoc:all

Instance Method Summary collapse

Instance Method Details

#forward_message(forwarder, *messagesToForward) ⇒ Object



99
100
101
102
103
104
105
# File 'lib/pik/contrib/zip/stdrubyext.rb', line 99

def forward_message(forwarder, *messagesToForward)
  methodDefs = messagesToForward.map { 
    |msg| 
    "def #{msg}; #{forwarder}(:#{msg}); end"
  }
  module_eval(methodDefs.join("\n"))
end