Sha256: 5f82fefb74b139fdf1f87db2f9029d8bf10169a9dc6f8c8240dce6d54011b97d
Contents?: true
Size: 582 Bytes
Versions: 20
Compression:
Stored size: 582 Bytes
Contents
require 'shipitron' require 'yaml' require 'mustache' module Shipitron module Server class ParseTemplates include Metaractor required :templates required :template_context def call parsed = [] templates.each do |template| parsed << Smash.new(YAML.load(Mustache.render(template, template_context))) end context.parsed_templates = parsed end private def templates context.templates end def template_context context.template_context end end end end
Version data entries
20 entries across 20 versions & 1 rubygems