Project

erbr

0.0
The project is in a healthy, maintained state
Allows easy ERB layout rendering with embbed variables
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

erbr

erbr makes the bound and rendering of a given template inside a given layout allowing parameters to be passed and used inside it.

Installation

RubyGems:

gem install erbr

Gemfile:

gem "erbr", '~> 0.0.1'

Usage

ERBR works with a template and optional layout or arguments:

ERBR.render("template.html.erb", "layout.html.erb", :msg => "Binded Argument!")

# => <title>Layout Title</title>
# => <p>Template Content Binded With Layout</p>
# => <span>Binded Argument!</span>

Testing

simple as run rspec spec/rspec_test_erbr.rb to run behavior driven tests.

License

This project is under MIT license which grants you permission to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the software.