Sha256: ea5a9037d629fe3039230b3aee99abd1e80febff53a52b2e830a719e9ce821e7

Contents?: true

Size: 250 Bytes

Versions: 34

Compression:

Stored size: 250 Bytes

Contents

class Class
  # Easily add multiple methods that do the same thing.
  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
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
artfully_ose-1.2.0.pre.11 lib/artfully_ose/core_ext.rb
artfully_ose-1.2.0.pre.10 lib/artfully_ose/core_ext.rb
artfully_ose-1.2.0.pre.9 lib/artfully_ose/core_ext.rb
artfully_ose-1.2.0.pre.8 lib/artfully_ose/core_ext.rb
artfully_ose-1.2.0.pre.7 lib/artfully_ose/core_ext.rb
artfully_ose-1.2.0.pre.6 lib/artfully_ose/core_ext.rb
artfully_ose-1.2.0.pre.5 lib/artfully_ose/core_ext.rb
artfully_ose-1.2.0.pre.4 lib/artfully_ose/core_ext.rb
artfully_ose-1.2.0.pre.3 lib/artfully_ose/core_ext.rb
artfully_ose-1.2.0.pre.2 lib/artfully_ose/core_ext.rb
artfully_ose-1.2.0.pre.1 lib/artfully_ose/core_ext.rb
artfully_ose-1.2.0.pre lib/artfully_ose/core_ext.rb
artfully_ose-1.1.0 lib/artfully_ose/core_ext.rb
artfully_ose-1.1.0.rc2 lib/artfully_ose/core_ext.rb