NanoTemplate

Gem Gem Gemnasium Inch CI Travis Build Status AppVeyor Build Status codecov.io Code Climate

text template like erb that can be used with opal

Installation

Add this line to your application's Gemfile:

gem 'nano_template'

And then execute:

$ bundle

Or install it yourself as:

$ gem install nano_template

Usage

require 'nano_template'
require 'ostruct'

nano_template = NanoTemplate.new
proc = nano_template.template("<%= foo %>bar")
stash = OpenStruct.new({foo: 42})
p proc.call(stash) # "42bar"

API

API Document

License

This is released under MIT License.