Sha256: 25148f66201349a17485e692fc41756137c3bf3ae729e502a9d22bdae69a6797

Contents?: true

Size: 730 Bytes

Versions: 61

Compression:

Stored size: 730 Bytes

Contents

# encoding: utf-8
require 'fedux_org_stdlib/rake/task'

module FeduxOrgStdlib
  module Rake
    # Sub Task
    #
    # This class can be used to call other defined rake-tasks
    #
    # @see Rakefile
    class SubTask < Task
      # @!attribute [r] command
      #   The command to be executed
      attr_reader :sub_tasks

      # Create a new sub task task
      #
      # @param [Array] sub_tasks
      #   A list of sub tasks, e.g. 'namespace1:task1', 'task2'
      def initialize(
        sub_tasks:, 
        **args
      )
        super(**args)

        @sub_tasks = Array(sub_tasks)
      end

      # @private
      def run_task(verbose)
        sub_tasks.each { |t| ::Rake::Task[t].invoke }
      end
    end
  end
end

Version data entries

61 entries across 61 versions & 1 rubygems

Version Path
fedux_org-stdlib-0.7.21 lib/fedux_org_stdlib/rake/sub_task.rb
fedux_org-stdlib-0.7.20 lib/fedux_org_stdlib/rake/sub_task.rb
fedux_org-stdlib-0.7.19 lib/fedux_org_stdlib/rake/sub_task.rb
fedux_org-stdlib-0.7.18 lib/fedux_org_stdlib/rake/sub_task.rb
fedux_org-stdlib-0.7.17 lib/fedux_org_stdlib/rake/sub_task.rb
fedux_org-stdlib-0.7.16 lib/fedux_org_stdlib/rake/sub_task.rb
fedux_org-stdlib-0.7.15 lib/fedux_org_stdlib/rake/sub_task.rb
fedux_org-stdlib-0.7.14 lib/fedux_org_stdlib/rake/sub_task.rb
fedux_org-stdlib-0.7.12 lib/fedux_org_stdlib/rake/sub_task.rb
fedux_org-stdlib-0.7.11 lib/fedux_org_stdlib/rake/sub_task.rb
fedux_org-stdlib-0.7.10 lib/fedux_org_stdlib/rake/sub_task.rb
fedux_org-stdlib-0.7.8 lib/fedux_org_stdlib/rake/sub_task.rb
fedux_org-stdlib-0.7.7 lib/fedux_org_stdlib/rake/sub_task.rb
fedux_org-stdlib-0.7.6 lib/fedux_org_stdlib/rake/sub_task.rb
fedux_org-stdlib-0.7.5 lib/fedux_org_stdlib/rake/sub_task.rb
fedux_org-stdlib-0.7.4 lib/fedux_org_stdlib/rake/sub_task.rb
fedux_org-stdlib-0.7.3 lib/fedux_org_stdlib/rake/sub_task.rb
fedux_org-stdlib-0.7.2 lib/fedux_org_stdlib/rake/sub_task.rb
fedux_org-stdlib-0.7.1 lib/fedux_org_stdlib/rake/sub_task.rb
fedux_org-stdlib-0.7.0 lib/fedux_org_stdlib/rake/sub_task.rb