Class: Module

Inherits:
Object
  • Object
show all
Defined in:
lib/payline.rb

Instance Method Summary collapse

Instance Method Details

#include_module_methods(mod) ⇒ Object



6
7
8
9
10
# File 'lib/payline.rb', line 6

def include_module_methods(mod)
  mod.singleton_methods.each do |m|
    (class << self; self; end).send :define_method, m, mod.method(m).to_proc
  end
end