Sha256: b36641c904d31c231bfa8da66d333747a4f632cc4172a415c899e78ca261511e

Contents?: true

Size: 900 Bytes

Versions: 34

Compression:

Stored size: 900 Bytes

Contents

# encoding: utf-8

require 'rake'
require 'rake/tasklib'
require 'inch/cli'

module Inch
  # Holds all Rake tasks
  module Rake
    # Provides Rake task integration
    class Suggest < ::Rake::TaskLib
      # @return [String] name of the Rake task
      attr_accessor :name
      # @return [Array] arguments to be passed to Suggest.run
      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

      # @return [void]
      def suggest
        ::Inch::CLI::Command::Suggest.run(*@args)
      end
    end
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
inch-0.9.0.rc1 lib/inch/rake/suggest.rb
inch-0.8.0 lib/inch/rake/suggest.rb
inch-0.8.0.rc2 lib/inch/rake/suggest.rb
inch-0.8.0.rc1 lib/inch/rake/suggest.rb
inch-0.7.1 lib/inch/rake/suggest.rb
inch-0.7.0 lib/inch/rake/suggest.rb
inch-0.6.4 lib/inch/rake/suggest.rb
inch-0.6.3 lib/inch/rake/suggest.rb
inch-0.6.2 lib/inch/rake/suggest.rb
inch-0.6.1 lib/inch/rake/suggest.rb
inch-0.6.0 lib/inch/rake/suggest.rb
inch-0.6.0.rc6 lib/inch/rake/suggest.rb
inch-0.6.0.rc5 lib/inch/rake/suggest.rb
inch-0.6.0.rc4 lib/inch/rake/suggest.rb
inch-0.6.0.rc3 lib/inch/rake/suggest.rb
inch-0.6.0.rc2 lib/inch/rake/suggest.rb
inch-0.6.0.rc1 lib/inch/rake/suggest.rb
inch-0.5.10 lib/inch/rake/suggest.rb
inch-0.5.9 lib/inch/rake/suggest.rb
inch-0.5.8 lib/inch/rake/suggest.rb