Class: Command

Inherits:
Object
  • Object
show all
Defined in:
lib/rust/syntax/command.rb

Overview

NO LONGER IN USE BUT USED TO BE USED BY CommandCenter

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, args, str = {:stdin => STDIN, :stdout => STDOUT, :stderr => STDERR}) ⇒ Command

Returns a new instance of Command.



13
14
15
16
17
# File 'lib/rust/syntax/command.rb', line 13

def initialize(name, args, str={:stdin => STDIN, :stdout => STDOUT, :stderr => STDERR})
  @command = name
  @arguments = args
  @streams = { :stdin => str[:in], :stdout => str[:out], :stderr => str[:err] }
end

Instance Attribute Details

#argumentsObject (readonly)

Returns the value of attribute arguments.



11
12
13
# File 'lib/rust/syntax/command.rb', line 11

def arguments
  @arguments
end

#commandObject (readonly)

Returns the value of attribute command.



11
12
13
# File 'lib/rust/syntax/command.rb', line 11

def command
  @command
end

Instance Method Details

#runObject



19
20
21
# File 'lib/rust/syntax/command.rb', line 19

def run
  exec(@command, @arguments)
end