Class: Raw::MorphFilter
- Inherits:
-
Object
- Object
- Raw::MorphFilter
- Defined in:
- lib/raw/compiler/filter/morph.rb
Overview
A Filter that transforms an xml stream. Multiple ‘key’ attributes are supported per element.
Defined Under Namespace
Classes: Listener
Instance Attribute Summary collapse
-
#morphers ⇒ Object
A collection of morphers registered with this filter.
Instance Method Summary collapse
-
#apply(source) ⇒ Object
Apply the filter.
-
#initialize(morphers = nil) ⇒ MorphFilter
constructor
Initialize the filter.
Constructor Details
#initialize(morphers = nil) ⇒ MorphFilter
Initialize the filter.
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
# File 'lib/raw/compiler/filter/morph.rb', line 95 def initialize(morphers = nil) unless @morphers = morphers require "raw/compiler/filter/morph/times" require "raw/compiler/filter/morph/each" require "raw/compiler/filter/morph/for" require "raw/compiler/filter/morph/if" require "raw/compiler/filter/morph/selected_if" @morphers = [ TimesMorpher, EachMorpher, ForMorpher, IfMorpher, SelectedIfMorpher ] end end |
Instance Attribute Details
#morphers ⇒ Object
A collection of morphers registered with this filter.
91 92 93 |
# File 'lib/raw/compiler/filter/morph.rb', line 91 def morphers @morphers end |