Sha256: 673b540abec0e1562fac47b7e9f28e73688a5c6cb9c2479007433e442a5dff3a

Contents?: true

Size: 321 Bytes

Versions: 5

Compression:

Stored size: 321 Bytes

Contents

module Cucover
  module Monkey
    def self.extend_every(args)
      class_to_extend = args.keys.first
      module_to_extend_with = args.values.first
    
      class_to_extend.instance_eval <<-PATCH
        def new(*args)
          super(*args).extend(#{module_to_extend_with})
        end
      PATCH
    end
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
mattwynne-cucover-0.1.0 lib/cucover/monkey.rb
mattwynne-cucover-0.1.1 lib/cucover/monkey.rb
cucover-0.1.4 lib/cucover/monkey.rb
cucover-0.1.3 lib/cucover/monkey.rb
cucover-0.1.2 lib/cucover/monkey.rb