Sha256: d39a65b8d2ce086f41481b0e81f9b3645de6f80ebaae03513890d2efa6e649b8

Contents?: true

Size: 559 Bytes

Versions: 7

Compression:

Stored size: 559 Bytes

Contents

# frozen_string_literal: true

module CommandKit
  module Commands
    #
    # Allows a command to be aware of it's parent command.
    #
    module ParentCommand

      # The parent command instance.
      #
      # @return [Object<Commands>]
      #
      # @api semipublic
      attr_reader :parent_command

      #
      # Initializes the command and sets {#parent_command}.
      #
      # @api public
      #
      def initialize(parent_command: , **kwargs)
        @parent_command = parent_command

        super(**kwargs)
      end

    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
command_kit-0.6.0 lib/command_kit/commands/parent_command.rb
command_kit-0.5.6 lib/command_kit/commands/parent_command.rb
command_kit-0.5.5 lib/command_kit/commands/parent_command.rb
command_kit-0.5.4 lib/command_kit/commands/parent_command.rb
command_kit-0.5.3 lib/command_kit/commands/parent_command.rb
command_kit-0.5.2 lib/command_kit/commands/parent_command.rb
command_kit-0.5.1 lib/command_kit/commands/parent_command.rb