Sha256: 0b49c7c501d5d032b0d7368e33c44b3130f33ec8c4f7134392da5bef2f229e1e

Contents?: true

Size: 679 Bytes

Versions: 5

Compression:

Stored size: 679 Bytes

Contents

# encoding: utf-8

require 'rake'
require 'rake/tasklib'

module Inch
  module Rake
    class Suggest < ::Rake::TaskLib
      attr_accessor :name
      attr_accessor :args

      # @param name [String] name of the Rake task
      # @param *args [Array] arguments to be passed to Suggest.run
      # @param &block [Proc] optional, evaluated inside the task definition
      def initialize(name = "inch", *args, &block)
        @name = name
        @args = args
        block.call(self) if block

        desc "Suggest objects to add documention to"
        task(@name) { suggest }
      end

      def suggest
        CLI::Command::Suggest.run(*@args)
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
inch-0.2.3 lib/inch/rake/suggest.rb
inch-0.2.2 lib/inch/rake/suggest.rb
inch-0.2.1 lib/inch/rake/suggest.rb
inch-0.2.0 lib/inch/rake/suggest.rb
inch-0.1.4 lib/inch/rake/suggest.rb