Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/svenfuchs/minimal
Minimal templating engine inspired by Markaby & Erector but much smaller and targeting Rails 3
https://github.com/svenfuchs/minimal
Last synced: about 2 months ago
JSON representation
Minimal templating engine inspired by Markaby & Erector but much smaller and targeting Rails 3
- Host: GitHub
- URL: https://github.com/svenfuchs/minimal
- Owner: svenfuchs
- Created: 2010-03-06T12:52:35.000Z (almost 15 years ago)
- Default Branch: master
- Last Pushed: 2012-02-27T00:15:19.000Z (almost 13 years ago)
- Last Synced: 2024-10-26T22:39:38.877Z (2 months ago)
- Language: Ruby
- Homepage: http://github.com/svenfuchs/minimal
- Size: 528 KB
- Stars: 26
- Watchers: 5
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Minimal::Template [![Build Status](https://secure.travis-ci.org/svenfuchs/minimal.png?branch=master)](http://travis-ci.org/svenfuchs/minimal)
Minimal::Template is an experimental, minimalistic templating engine inspired by
[Markaby]:(http://github.com/markaby/markaby) &
[Erector]:(http://erector.rubyforge.org) but much smaller (~55 loc) and
targeted at Rails 3.# views/foo/bar.rb
module Foo
class Bar < Minimal::Template
def to_html
html do
head
body do
h1 'plain'
p local
end
end
end
end
end# somewhere else
view = ActionView::Base.new('path/to/your/views')
view.render(:file => 'foo/bar', :locals => { :local => 'local' })# => '
plain
local
'