Method: WikiContentStub#inside_chunks
- Defined in:
- app/models/wiki_content.rb
#inside_chunks(chunk_types) ⇒ Object
Detects the mask strings contained in the text of chunks of type chunk_types and yields the corresponding chunk ids example: content = “chunk123categorychunk <pre>chunk456categorychunk</pre>” inside_chunks(Literal::Pre) ==> yield 456
111 112 113 114 115 116 117 118 |
# File 'app/models/wiki_content.rb', line 111 def inside_chunks(chunk_types) chunk_types.each{|chunk_type| chunk_type.apply_to(self) } chunk_types.each{|chunk_type| @chunks_by_type[chunk_type].each{|hide_chunk| scan_chunkid(hide_chunk.text){|id| yield id } } } end |