text template like erb that can be used with opal
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
spec
.gitignore
.gitmodules
.rspec
.travis.yml
Gemfile
README.md
Rakefile
appveyor.yml
nano_template.gemspec

README.md

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.