jsontoerb¶ ↑
JsonToErb gem allows to render erb templates with json data with console command
After gem is installed you should be able to execute following command: ‘jsontoerb <path_to_erb_template> <json_data>’ and rendered template will be returned as output. One thing to be aware of: json key has to be quoted with “.
Example: template.erb <div>parmas</div> command: jsontoerb template.erb {"content": "Sweet!"} output: <div>Sweet!</div>
Copyright¶ ↑
Copyright © 2013 Andriy Romanov. See LICENSE.txt for further details.