Module: Noah::Passthrough

Included in:
CustomWatcher
Defined in:
lib/noah/passthrough.rb

Instance Method Summary collapse

Instance Method Details

#passthrough(*methods) ⇒ Object


3
4
5
6
7
8
9
# File 'lib/noah/passthrough.rb', line 3

def passthrough(*methods)
  methods.each do |method|
    raise ArgumentError if ! method.is_a?(Symbol)
    meth = method.to_s
    self.class_eval("def #{meth}(*args); self.class.#{meth}(*args); end")
  end
end