Sha256: 8862405fc8b833ae11e562d5e0f80921c2c4a2e114d60164f6dbdc0619a8f791
Contents?: true
Size: 359 Bytes
Versions: 39
Compression:
Stored size: 359 Bytes
Contents
require 'forward_to' module ForwardTo def forward_self_to(target, *methods) for method in Array(methods).flatten if method =~ /=$/ class_eval("def self.#{method}(*args) #{target}.#{method}(*args) end") else class_eval("def self.#{method}(*args, &block) #{target}.#{method}(*args, &block) end") end end end end
Version data entries
39 entries across 39 versions & 1 rubygems