Class: Dizby::SelfPipe

Inherits:
Struct
  • Object
show all
Defined in:
lib/dizby/utility/self_pipe.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#readObject

Returns the value of attribute read

Returns:

  • (Object)

    the current value of read



9
10
11
# File 'lib/dizby/utility/self_pipe.rb', line 9

def read
  @read
end

#writeObject

Returns the value of attribute write

Returns:

  • (Object)

    the current value of write



9
10
11
# File 'lib/dizby/utility/self_pipe.rb', line 9

def write
  @write
end

Instance Method Details

#close_read



11
12
13
# File 'lib/dizby/utility/self_pipe.rb', line 11

def close_read
  read.close if read && !read.closed?
end

#close_write



15
16
17
# File 'lib/dizby/utility/self_pipe.rb', line 15

def close_write
  write.close if write && !write.closed?
end