Class: Command
- Inherits:
-
Object
- Object
- Command
- Defined in:
- lib/rust/syntax/command.rb
Overview
NO LONGER IN USE BUT USED TO BE USED BY CommandCenter
Instance Attribute Summary collapse
-
#arguments ⇒ Object
readonly
Returns the value of attribute arguments.
-
#command ⇒ Object
readonly
Returns the value of attribute command.
Instance Method Summary collapse
-
#initialize(name, args, str = {:stdin => STDIN, :stdout => STDOUT, :stderr => STDERR}) ⇒ Command
constructor
A new instance of Command.
- #run ⇒ Object
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
#arguments ⇒ Object (readonly)
Returns the value of attribute arguments.
11 12 13 |
# File 'lib/rust/syntax/command.rb', line 11 def arguments @arguments end |
#command ⇒ Object (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
#run ⇒ Object
19 20 21 |
# File 'lib/rust/syntax/command.rb', line 19 def run exec(@command, @arguments) end |