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.3.0.pre4 lib/artfully_ose/core_ext.rb
artfully_ose-1.3.0.pre3 lib/artfully_ose/core_ext.rb
artfully_ose-1.3.0.pre2 lib/artfully_ose/core_ext.rb
artfully_ose-1.3.0.pre1 lib/artfully_ose/core_ext.rb
artfully_ose-1.2.0 lib/artfully_ose/core_ext.rb
artfully_ose-1.2.0.beta.1 lib/artfully_ose/core_ext.rb
artfully_ose-1.2.0.alpha.2 lib/artfully_ose/core_ext.rb
artfully_ose-1.2.0.alpha.1 lib/artfully_ose/core_ext.rb
artfully_ose-1.2.0.pre.27 lib/artfully_ose/core_ext.rb
artfully_ose-1.2.0.pre.26 lib/artfully_ose/core_ext.rb
artfully_ose-1.2.0.pre.24 lib/artfully_ose/core_ext.rb
artfully_ose-1.2.0.pre.23 lib/artfully_ose/core_ext.rb
artfully_ose-1.2.0.pre.21 lib/artfully_ose/core_ext.rb
artfully_ose-1.2.0.pre.20 lib/artfully_ose/core_ext.rb
artfully_ose-1.2.0.pre.19 lib/artfully_ose/core_ext.rb
artfully_ose-1.2.0.pre.18 lib/artfully_ose/core_ext.rb
artfully_ose-1.2.0.pre.17 lib/artfully_ose/core_ext.rb
artfully_ose-1.2.0.pre.16 lib/artfully_ose/core_ext.rb
artfully_ose-1.2.0.pre.15 lib/artfully_ose/core_ext.rb
artfully_ose-1.2.0.pre.12 lib/artfully_ose/core_ext.rb