Module: Xail
- Defined in:
- lib/xail.rb,
lib/xail/ui.rb,
lib/xail/config.rb,
lib/xail/filter.rb,
lib/xail/version.rb
Defined Under Namespace
Modules: DSL Classes: AbstractColorFilter, AbstractCompoundFilter, AbstractFilter, AndFilter, BellFilter, Black, Blink, Blue, Bold, ContainsFilter, Cyan, Dark, FilterCascade, FilterComposition, FilterRegistry, Green, Magenta, Negative, NotFilter, OnBlack, OnBlue, OnCyan, OnGreen, OnMagenta, OnRed, OnWhite, OnYellow, OrFilter, PassThroughFilter, Red, ReplaceFilter, SampleFilter, StopFilter, UI, Underscore, UnknownFilter, White, Yellow
Constant Summary collapse
- VERSION =
"0.0.1"
Class Method Summary collapse
Class Method Details
.run(configuration) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/xail.rb', line 18 def Xail.run(configuration) begin extend Xail::DSL eval(configuration) filter = filter_in_scope if !has_final filter << PassThroughFilter.new end end stream = $stdin stream.each() do |line| streamed = filter.streamLine(line) if streamed and streamed.size > 0 printf streamed end end end |