Sha256: 626812c2ac901bfa4aad2094457651868a1a14a72959b69d61f40540459979bd

Contents?: true

Size: 712 Bytes

Versions: 1

Compression:

Stored size: 712 Bytes

Contents

# encoding: utf-8

require "rake"
require "rake/tasklib"

module Inch
  # Holds all Rake tasks
  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
        ::Inch::CLI::Command::Suggest.run(*@args)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
inch-0.4.7 lib/inch/rake/suggest.rb