out
is a program that outputs everything. This is a proof of concept and probably isn't ready for production.
git clone https://github.com/sapslaj/out
cd out
rake install
out some_file
or
out some_directory
See lib/out/handlers
for examples.
# Subclass Out::Handler
class DemoHandler < Out::Handler
match /^demo$/ # Match using a regex
match "demo" # Match using a string
match proc { |t| t == 'demo' } # Match using a proc
# Calls this method if it's matched
def execute(*arguments)
puts File.read(arguments.last)
end
end
The API is super unstable at this point, and the final project will most likely be rewritten in a more portable language, so contribute at your own risk. There are also no tests. So. Have fun with that.
The gem is available as open source under the terms of the MIT License.