Class: Uttk::Filters::TextFilter
- Inherits:
-
KeepSkipBased
- Object
- Logger::Backend
- Filter
- Id
- KeepSkipBased
- Uttk::Filters::TextFilter
- Includes:
- Concrete
- Defined in:
- lib/uttk/filters/TextFilter.rb
Instance Attribute Summary
Attributes inherited from KeepSkipBased
Instance Method Summary collapse
-
#initialize(observers, options, &b) ⇒ TextFilter
constructor
FIXME can be path based This filter use the Text manipulation class of RubyEx.
Methods inherited from KeepSkipBased
Methods inherited from Filter
Methods inherited from Logger::Backend
Constructor Details
#initialize(observers, options, &b) ⇒ TextFilter
FIXME can be path based This filter use the Text manipulation class of RubyEx. You can apply transformation over leaves content.
This filter takes two arguments:
- observers: An observer list like any filter
- options:
keep: A regular expression (all keys which match this regexp are transformed)
skip: Antoher regexp that skip keys which match
action: What transformation apply (e.g. justify), see the _Text_ class for
more informations
width: Maximal width of a line
Examples:
Yaml syntax: 'TextFilter: [!keep "^(in|out)put$", !action justify, Yaml]'
31 32 33 34 35 |
# File 'lib/uttk/filters/TextFilter.rb', line 31 def initialize ( observers, , &b ) super @text_factory = MetaFactory.new(Text, @options) @filter_next_leaf = false end |