Package br.com.caelum.tubaina.builder.replacer

Source Code of br.com.caelum.tubaina.builder.replacer.BoxReplacer

package br.com.caelum.tubaina.builder.replacer;

import java.util.List;

import br.com.caelum.tubaina.Chunk;
import br.com.caelum.tubaina.builder.ChunkSplitter;
import br.com.caelum.tubaina.chunk.BoxChunk;
import br.com.caelum.tubaina.resources.Resource;

public class BoxReplacer extends AbstractReplacer {

  private List<Resource> resources;
 
  public BoxReplacer(List<Resource> resources) {
    super("box");
    this.resources = resources;
  }

  @Override
  public Chunk createChunk(String options, String content) {
    String title = options.trim();
    List<Chunk> body = new ChunkSplitter(resources, "box").splitChunks(content);
    return new BoxChunk(title, body);
  }

}
TOP

Related Classes of br.com.caelum.tubaina.builder.replacer.BoxReplacer

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.