class Ppl::Command::External

Attributes

command[RW]

Public Class Methods

new(name, command, description) click to toggle source
# File lib/ppl/command/external.rb, line 5
def initialize(name, command, description)
  @name = name
  @command = command
  @description = description
end

Public Instance Methods

execute(input, output) click to toggle source
# File lib/ppl/command/external.rb, line 11
def execute(input, output)
  if !input.arguments.empty?
    @command += " " + input.arguments.join(" ")
  end
  Dir.chdir(@storage.path)
  Kernel.exec(@command)
end