#
# The module is a proof-of-concept to investigate the abuse of
# the `for` structure to implement various services.
#
# The module is a proof-of-concept to investigate the abuse of
# the `for` structure to implement various services.
# Abuser to read a file, see `file_open`
private class ReadFileForAbuser
# Abuser to read a file, see `file_open`
private class ReadFileForAbuser
var path: String
redef fun iterator do return new ReadFileForAbuserIterator(path)
end
# Abuser iterator to read a file, see `file_open`
private class ReadFileForAbuserIterator
var path: String
redef fun iterator do return new ReadFileForAbuserIterator(path)
end
# Abuser iterator to read a file, see `file_open`
private class ReadFileForAbuserIterator
# The abuse just ensures that the file is closed after the reading.
#
# for f in file_open("/etc/issue") do
# The abuse just ensures that the file is closed after the reading.
#
# for f in file_open("/etc/issue") do