Class Module
In: lib/rake.rb
Parent: Object

Rake extensions to Module.

Methods

External Aliases

const_missing -> rake_original_const_missing
  Rename the original handler to make it available.

Public Instance methods

Check for deprecated uses of top level (i.e. in Object) uses of Rake class names. If someone tries to reference the constant name, display a warning and return the proper object. Using the —classic-namespace command line option will define these constants in Object and avoid this handler.

Check for an existing method in the current class before extending. IF the method already exists, then a warning is printed and the extension is not added. Otherwise the block is yielded and any definitions in the block will take effect.

Usage:

  class String
    rake_extension("xyz") do
      def xyz
        ...
      end
    end
  end

[Validate]