class Kontena::Plugin::Shell::ContextTopCommand

Public Instance Methods

execute() click to toggle source
# File lib/kontena/plugin/shell/commands/context_top.rb, line 10
def execute
  if args[1] && session
    old_context = context.to_a.clone
    context.top
    session.run_command(args[1..-1].join(' '))
    context.concat(old_context) if context.empty?
  else
    context.top
  end
end