class Sequence::File
This class treats an IO
(or StringIO
) as an Sequence
. An IO
is already like an Sequence
, but with a differing interface.
Actually, we assume that the IO
is capable of seeking, so it most likely must be a File
. delete/insert at arbitrary location is not supported.
Public Class Methods
new(file,mode="r")
click to toggle source
# File lib/sequence/file.rb, line 17 def initialize(file,mode="r") case file when Integer; file=IO.new(file,mode) when String; file=File.new(file,mode) else #do nothing, file is of a right type (we hope) already end @io = file end