Sha256: 237b649e9c9927f86a72494e86db0695fb2c629a62c8db39da894e7d1ac2568d
Contents?: true
Size: 556 Bytes
Versions: 10
Compression:
Stored size: 556 Bytes
Contents
# -*- coding: utf-8 -*- require 'erubis' module KnifeSkeleton # Render template class Template # Static: Render template with Erubis # # Examples: # # KnifeSkeleton::Template.render('Hello <%= title %>', {title: 'GoT'}) # # => "Hello GoT" # # @param [String] template Template string to used for rendering # @param [String] data Data binding # return [String] def self.render(template, data) eruby = Erubis::Eruby.new(template) output = eruby.result(data) output end end end
Version data entries
10 entries across 10 versions & 1 rubygems