Class: Module

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

Overview

:nodoc:all

Instance Method Summary (collapse)

Instance Method Details

- (Object) forward_message(forwarder, *messagesToForward)



99
100
101
102
103
104
105
# File 'lib/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