Class: Cmds::Pipe

Inherits:
Object
  • Object
show all
Defined in:
lib/cmds/pipe.rb

Overview

stupid little wrapper around IO.pipe that can have some extra info attached to it

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, sym) ⇒ Pipe

Returns a new instance of Pipe.



7
8
9
10
11
# File 'lib/cmds/pipe.rb', line 7

def initialize name, sym
  @name = name
  @sym = sym
  @r, @w = IO.pipe
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/cmds/pipe.rb', line 5

def name
  @name
end

#rObject (readonly)

Returns the value of attribute r.



5
6
7
# File 'lib/cmds/pipe.rb', line 5

def r
  @r
end

#symObject (readonly)

Returns the value of attribute sym.



5
6
7
# File 'lib/cmds/pipe.rb', line 5

def sym
  @sym
end

#wObject (readonly)

Returns the value of attribute w.



5
6
7
# File 'lib/cmds/pipe.rb', line 5

def w
  @w
end