Class: ShellTastic::Command

Inherits:
Object
  • Object
show all
Defined in:
lib/shelltastic.rb

Overview

Command is the namespace for the actual meat of the gem

Class Method Summary collapse

Class Method Details

.run(*command) ⇒ Array

encapsualtes the popen call ShellTastic::Command.run “whoami” ShellTastic::Command.run “whoami”, “date”

Parameters:

  • command (String)

    command or multiple commands to be executed

  • timer (Object)

    timer object, @see ShellTastic::Timer

Returns:

  • (Array)

    Array of hashes for each command executed @see IO::popen



19
20
21
# File 'lib/shelltastic.rb', line 19

def run(*command)
  command.flatten.map { |cmd| ShellTastic::IO.popen(cmd, ShellTastic::Timer) }
end