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, SinkFilter, StopFilter, StreamLineStop, UI, Underscore, UnknownFilter, White, Yellow

Constant Summary collapse

VERSION =
"0.0.3"

Class Method Summary collapse

Class Method Details

.build_from_config(configuration) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/xail/config.rb', line 5

def self.build_from_config(configuration)
  begin
    extend Xail::DSL
    eval(configuration)

    filter = filter_in_scope

    if !has_final
      filter << PassThroughFilter.new
    end
  end

  return filter
end