Sha256: 086416953544519cd7ea73aa0db1592005879d53817299f564973d1aa4b46630

Contents?: true

Size: 528 Bytes

Versions: 8

Compression:

Stored size: 528 Bytes

Contents

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

8 entries across 8 versions & 1 rubygems

Version Path
command_kit-0.5.0 lib/command_kit/commands/parent_command.rb
command_kit-0.4.1 lib/command_kit/commands/parent_command.rb
command_kit-0.4.0 lib/command_kit/commands/parent_command.rb
command_kit-0.3.0 lib/command_kit/commands/parent_command.rb
command_kit-0.2.2 lib/command_kit/commands/parent_command.rb
command_kit-0.2.1 lib/command_kit/commands/parent_command.rb
command_kit-0.2.0 lib/command_kit/commands/parent_command.rb
command_kit-0.1.0 lib/command_kit/commands/parent_command.rb