Class: Engines::AbstractEngine

Inherits:
Chunk::Abstract show all
Defined in:
app/models/chunks/engines.rb

Direct Known Subclasses

Markdown, Mixed, RDoc, Textile

Instance Attribute Summary

Attributes inherited from Chunk::Abstract

#text, #unmask_mode, #unmask_text

Class Method Summary collapse

Methods inherited from Chunk::Abstract

#escaped?, #id, inherited, #mask, mask_re, mask_string, #rendered?, #revert, #unmask

Class Method Details

.apply_to(content) ⇒ Object

Create a new chunk for the whole content and replace it with its mask.



15
16
17
18
# File 'app/models/chunks/engines.rb', line 15

def self.apply_to(content)
  new_chunk = self.new(content)
  content.replace(new_chunk.mask)
end