lbt / file-tail Goto Github PK
View Code? Open in Web Editor NEWThis project forked from flori/file-tail
File::Tail for Ruby
Home Page: http://flori.github.com/file-tail
License: GNU General Public License v2.0
This project forked from flori/file-tail
File::Tail for Ruby
Home Page: http://flori.github.com/file-tail
License: GNU General Public License v2.0
== Description This is a small ruby library that allows it to "tail" files in Ruby, including following a file, that still is growing like the unix command 'tail -f' can. == Download The latest version of <b>File::Tail</b> (file-tail) can be found at http://www.ping.de/~flori Online Documentation should be located at http://flori.github.com/file-tail == Installation To install file-tail via its gem type: # gem install file-tail To install from the source repository, just type into the command line as root: # rake install or # ruby install.rb == Usage File::Tail is a module in the File class. A lightweight class interface for logfiles can be seen under File::Tail::Logfile. Direct extension of File objects with File::Tail works like that: File.open(filename) do |log| log.extend(File::Tail) log.interval = 10 log.backward(10) log.tail { |line| puts line } end It's also possible to mix File::Tail in your own File classes (see also File::Tail::Logfile): class MyFile < File include File::Tail end log = MyFile.new("myfile") log.interval = 10 log.backward(10) log.tail { |line| print line } The forward/backward method returns self, so it's possible to chain methods together like that: log.backward(10).tail { |line| puts line } == Documentation To create the documentation of this module, type $ rake doc or $ ruby make_doc.rb and the API documentation is generated by your rdoc command. In the examples direcotry is a small example of tail and pager program that use this module. You also may want look at the end of file/tail.rb for a little example. == Author Florian Frank mailto:[email protected] == License This is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License Version 2 as published by the Free Software Foundation: http://www.gnu.org/copyleft/gpl.html
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.