Module: Pvectl::Commands::ContainerLifecycleCommand

Includes:
ResourceLifecycleCommand
Included in:
RestartContainer, ShutdownContainer, StartContainer, StopContainer
Defined in:
lib/pvectl/commands/container_lifecycle_command.rb

Overview

Container-specific lifecycle command hooks.

Provides container repository, selector, service, and presenter to ResourceLifecycleCommand’s template methods.

Examples:

Usage

class StartContainer
  include ContainerLifecycleCommand
  OPERATION = :start
end

Class Method Summary collapse

Methods included from ResourceLifecycleCommand

#execute, #initialize

Class Method Details

.included(base) ⇒ Object

Extends the including class with ClassMethods from ResourceLifecycleCommand.

Parameters:

  • base (Class)

    the class including this module



22
23
24
# File 'lib/pvectl/commands/container_lifecycle_command.rb', line 22

def self.included(base)
  base.extend(ResourceLifecycleCommand::ClassMethods)
end