Sha256: ba110ff985224a40b388fd5cd86f0ba5a3fd623e517a27d95e99fa26289b2996

Contents?: true

Size: 837 Bytes

Versions: 1

Compression:

Stored size: 837 Bytes

Contents

require_relative "shelltastic/version"
require_relative "shelltastic/utils"
require_relative "shelltastic/command_io"
require_relative "shelltastic/timer"
require_relative "shelltastic/exceptions"

# @! ShellTastic 
module ShellTastic
  # Command is the namespace for the actual meat of the gem
  class Command
    class << self
      # encapsualtes the popen call 
      # @param command [String] command or multiple commands to be executed
      # @param timer [Object] timer object, @see ShellTastic::Timer
      # @return [Array] Array of hashes for each command executed @see IO::popen
      # @example
      # ShellTastic::Command.run "whoami"
      # ShellTastic::Command.run "whoami", "date"
      def run(*command)
        command.flatten.map { |cmd| ShellTastic::IO.popen(cmd, ShellTastic::Timer) }
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
shelltastic-0.2.5 lib/shelltastic.rb