Class: Test::Cmd::Pipe Private

Inherits:
Struct
  • Object
show all
Defined in:
lib/test/cmd.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#rObject

Returns the value of attribute r

Returns:

  • (Object)

    the current value of r



10
11
12
# File 'lib/test/cmd.rb', line 10

def r
  @r
end

#wObject

Returns the value of attribute w

Returns:

  • (Object)

    the current value of w



10
11
12
# File 'lib/test/cmd.rb', line 10

def w
  @w
end

Class Method Details

.pairObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



11
12
13
# File 'lib/test/cmd.rb', line 11

def self.pair
  new(*IO.pipe)
end

Instance Method Details

#closeObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



15
16
17
# File 'lib/test/cmd.rb', line 15

def close
  [r, w].each(&:close)
end