Module: Exit_Zero::Child::Base

Included in:
Exit_Zero::Child
Defined in:
lib/Exit_Zero.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#childObject (readonly)

Returns the value of attribute child.



39
40
41
# File 'lib/Exit_Zero.rb', line 39

def child
  @child
end

#cmdObject (readonly)

Returns the value of attribute cmd.



39
40
41
# File 'lib/Exit_Zero.rb', line 39

def cmd
  @cmd
end

Instance Method Details

#initialize(*cmd) ⇒ Object



40
41
42
43
# File 'lib/Exit_Zero.rb', line 40

def initialize *cmd
  @child = POSIX::Spawn::Child.new(*cmd)
  @cmd = cmd.join(' ')
end

#split_linesObject



45
46
47
# File 'lib/Exit_Zero.rb', line 45

def split_lines
  Split_Lines(child.out)
end