Class: OsCtld::ContainerControl::Commands::RunBlock::Frontend

Inherits:
Frontend
  • Object
show all
Defined in:
lib/osctld/container_control/commands/runblock.rb

Instance Attribute Summary

Attributes inherited from Frontend

#command_class, #ct

Instance Method Summary collapse

Methods inherited from Frontend

#initialize, #pipe_runner

Constructor Details

This class inherits a constructor from OsCtld::ContainerControl::Frontend

Instance Method Details

#execute(opts) ⇒ OsCtl::Lib::SystemCommandResult

Parameters:

  • opts (Hash)
  • [Proc] (Hash)

    a customizable set of options

Returns:

  • (OsCtl::Lib::SystemCommandResult)


14
15
16
17
18
19
20
# File 'lib/osctld/container_control/commands/runblock.rb', line 14

def execute(opts)
  unless ct.running?
    raise ContainerControl::Error, 'container not running'
  end

  pipe_runner(args: [opts])
end