file_open
for_abuse $ ReadFileForAbuserIterator :: SELF
Type of this instance, automatically specialized in every classcore :: Object :: class_factory
Implementation used byget_class
to create the specific class.
core :: Object :: defaultinit
core :: Iterator :: defaultinit
core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
core :: Object :: native_class_name
The class name of the object in CString format.Iterator
whose elements are sorted by the function
core :: Object :: output_class_name
Display class name on stdout (debug only).
# Abuser iterator to read a file, see `file_open`
private class ReadFileForAbuserIterator
super Iterator[FileReader]
var path: String
redef var item: FileReader is noinit
redef var is_ok = true
init
do
# start of service is to open the file, and return in
item = new FileReader.open(path)
end
redef fun next
do
# end of service is to close the file
# there is only one iteration
is_ok = false
item.close
end
end
lib/for_abuse/for_abuse.nit:46,1--64,3