Class: Codex::PostProcessors
- Inherits:
-
Object
- Object
- Codex::PostProcessors
- Includes:
- Singleton
- Defined in:
- lib/codex/post_processor.rb
Instance Method Summary collapse
- #<<(post_processor_class) ⇒ Object
- #delete(post_processor_class) ⇒ Object
- #process_all(html) ⇒ Object
Instance Method Details
#<<(post_processor_class) ⇒ Object
17 18 19 |
# File 'lib/codex/post_processor.rb', line 17 def << (post_processor_class) @post_processors << post_processor_class end |
#delete(post_processor_class) ⇒ Object
20 21 22 |
# File 'lib/codex/post_processor.rb', line 20 def delete(post_processor_class) @post_processors.delete(post_processor_class) end |
#process_all(html) ⇒ Object
23 24 25 26 27 28 29 30 31 |
# File 'lib/codex/post_processor.rb', line 23 def process_all(html) @new_html = html @post_processors.each do |pp_class| processor = pp_class.new(@new_html) processor.process @new_html = processor.html end @new_html end |