Module: RakeFactory::Definable

Included in:
Task, TaskSet
Defined in:
lib/rake_factory/definable.rb

Instance Method Summary collapse

Instance Method Details

#inherited(inheritor) ⇒ Object



3
4
5
6
7
8
9
10
# File 'lib/rake_factory/definable.rb', line 3

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