Sha256: 0f4f07e6f0739e405ae2314e2a5690466871220f17f6e7ce1af0f4893e83f076

Contents?: true

Size: 487 Bytes

Versions: 1

Compression:

Stored size: 487 Bytes

Contents

require_relative "registry"

module OopsARake
  module Task
    def self.included(klass)
      Registry::register(klass)
      klass.extend(ClassMethods)
    end

    module ClassMethods
      def description(description)
        task.comment = description
      end

      def prerequisites(*args)
        task.enhance(args)
      end

      alias_method :prerequisite, :prerequisites

      private

      def task
        ::OopsARake::Registry.fetch(self)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
oops_a_rake-0.1.0 lib/oops_a_rake/task.rb