Sha256: 15581c88112c22da9982a9c406f93eeea6327d8d6f33d18e7998849c1e0465b3

Contents?: true

Size: 730 Bytes

Versions: 56

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

56 entries across 56 versions & 1 rubygems

Version Path
fedux_org-stdlib-0.11.18 lib/fedux_org_stdlib/rake/sub_task.rb
fedux_org-stdlib-0.11.17 lib/fedux_org_stdlib/rake/sub_task.rb
fedux_org-stdlib-0.11.16 lib/fedux_org_stdlib/rake/sub_task.rb
fedux_org-stdlib-0.11.15 lib/fedux_org_stdlib/rake/sub_task.rb
fedux_org-stdlib-0.11.14 lib/fedux_org_stdlib/rake/sub_task.rb
fedux_org-stdlib-0.11.12 lib/fedux_org_stdlib/rake/sub_task.rb
fedux_org-stdlib-0.11.11 lib/fedux_org_stdlib/rake/sub_task.rb
fedux_org-stdlib-0.11.9 lib/fedux_org_stdlib/rake/sub_task.rb
fedux_org-stdlib-0.11.8 lib/fedux_org_stdlib/rake/sub_task.rb
fedux_org-stdlib-0.11.7 lib/fedux_org_stdlib/rake/sub_task.rb
fedux_org-stdlib-0.11.6 lib/fedux_org_stdlib/rake/sub_task.rb
fedux_org-stdlib-0.11.5 lib/fedux_org_stdlib/rake/sub_task.rb
fedux_org-stdlib-0.11.4 lib/fedux_org_stdlib/rake/sub_task.rb
fedux_org-stdlib-0.11.3 lib/fedux_org_stdlib/rake/sub_task.rb
fedux_org-stdlib-0.11.2 lib/fedux_org_stdlib/rake/sub_task.rb
fedux_org-stdlib-0.11.1 lib/fedux_org_stdlib/rake/sub_task.rb
fedux_org-stdlib-0.11.0 lib/fedux_org_stdlib/rake/sub_task.rb
fedux_org-stdlib-0.10.9 lib/fedux_org_stdlib/rake/sub_task.rb
fedux_org-stdlib-0.10.8 lib/fedux_org_stdlib/rake/sub_task.rb
fedux_org-stdlib-0.10.7 lib/fedux_org_stdlib/rake/sub_task.rb