class Coque::Cmd
Attributes
context[R]
Public Instance Methods
clone()
click to toggle source
# File lib/coque/cmd.rb, line 20 def clone raise "Not Implemented - Override" end
get_default_fds()
click to toggle source
# File lib/coque/cmd.rb, line 24 def get_default_fds stdin = if self.stdin self.stdin else inr, inw = IO.pipe inw.close inr end stdoutr, stdoutw = if self.stdout [self.stdout, self.stdout] else IO.pipe end [stdin, stdoutr, stdoutw] end
pipe(other)
click to toggle source
# File lib/coque/cmd.rb, line 7 def pipe(other) case other when Cmd Pipeline.new([self.clone, other.clone]) when Pipeline Pipeline.new([self.clone] + other.commands) end end
|(other)
click to toggle source
# File lib/coque/cmd.rb, line 16 def |(other) pipe(other) end