Class: Module

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

Instance Method Summary collapse

Instance Method Details

#forward_message(forwarder, *messagesToForward) ⇒ Object



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