package ru.yandex.autodoc.common.out.json.builder;

import java.io.IOException;

/**
 * @author avhaliullin
 */
public abstract class AbstractAppender {
    protected final Appendable appendable;

    protected AbstractAppender(Appendable appendable) {
        this.appendable = appendable;
    }

    protected void append(String s) {
        try {
            appendable.append(s);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}
