Class: Class

Inherits:
Object show all
Defined in:
lib/railings/extensions/class.rb

Instance Method Summary collapse

Instance Method Details

#def_each(*method_names, &block) ⇒ Object



2
3
4
5
6
7
8
# File 'lib/railings/extensions/class.rb', line 2

def def_each(*method_names, &block)
  method_names.each do |method_name|
    define_method method_name do
      instance_exec method_name, &block
    end
  end
end