Method: MemFs::IO#each_char

Defined in:
lib/memfs/io.rb

#each_charObject Also known as: chars



140
141
142
143
144
145
# File 'lib/memfs/io.rb', line 140

def each_char
  return to_enum(__callee__) unless block_given?
  fail IOError, 'not opened for reading' unless readable?
  content.each_char { |char| yield(char) }
  self
end