Sha256: 02e2bfbce851af99d9ccd7e75d589781c67c05aa14ff973635bb292c64ea806c

Contents?: true

Size: 312 Bytes

Versions: 4

Compression:

Stored size: 312 Bytes

Contents

# frozen_string_literal: true

module RakeFactory
  module Definable
    def inherited(inheritor)
      super
      inheritor.singleton_class.class_eval do
        define_method :define do |*args, &block|
          inheritor.new(*args, &block).define_on(Rake.application)
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rake_factory-0.34.0.pre.2 lib/rake_factory/definable.rb
rake_factory-0.34.0.pre.1 lib/rake_factory/definable.rb
rake_factory-0.33.0 lib/rake_factory/definable.rb
rake_factory-0.32.0.pre.6 lib/rake_factory/definable.rb