Sha256: a1248a3a5dc2c1a45bb41a2acb90a7f9e32321f64834b5f214f4ac59acc08bb8
Contents?: true
Size: 345 Bytes
Versions: 58
Compression:
Stored size: 345 Bytes
Contents
class IO # saves the position and returns to it after the block # is executed. Returns the block's reply. if rewind, io.rewind is called # before handing the io object to the block. def bookmark(rewind=false, &block) start = self.pos self.rewind if rewind reply = block.call(self) self.pos = start reply end end
Version data entries
58 entries across 58 versions & 2 rubygems