No commit activity in last 3 years
No release in over 3 years
Templates Engine for ObjectsFramework, currently only ERB templating supported, coming is HAML and others!
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 2.0.1
 Project Readme

ObjectsFramework Template Engine

This gem allows you to easily render templates in an ObjectsFramework Object. (If you are not familiar with ObjectsFramework be sure to check this repository)

Here is an example: Let say you wanted to render index.html.erb with the ERB templating engine, and you want to use layout.html.erb as the layout of your template.

require 'objectsframework/templates'

class User < ObjectsFramework::Object
	set_template_layout "layout.html.erb" # required
 	set_template_directory "views" # required

	def get_index
		response.write(render("index.html.erb"))
	end
end

License

MIT