package com.atlassian.stash.plugin.velocity;

import com.atlassian.bitbucket.view.VelocityHelper;
import com.atlassian.templaterenderer.TemplateRenderer;

import java.util.Map;

public class VelocityHelperImpl implements VelocityHelper {

    private final TemplateRenderer templateRenderer;

    public VelocityHelperImpl(TemplateRenderer templateRenderer) {
        this.templateRenderer = templateRenderer;
    }

    @Override
    public String renderFragment(String fragment, Map<String, Object> context) {
        return templateRenderer.renderFragment(fragment, context);
    }
}
