Method: Foreman::Thor::RakeCompat.included

Defined in:
lib/foreman/vendor/thor/lib/thor/rake_compat.rb

.included(base) ⇒ Object



27
28
29
30
31
32
# File 'lib/foreman/vendor/thor/lib/thor/rake_compat.rb', line 27

def self.included(base)
  # Hack. Make rakefile point to invoker, so rdoc task is generated properly.
  rakefile = File.basename(caller[0].match(/(.*):\d+/)[1])
  Rake.application.instance_variable_set(:@rakefile, rakefile)
  rake_classes << base
end