https://github.com/ytti/sapluuna
silly little templating system
https://github.com/ytti/sapluuna
Last synced: 12 months ago
JSON representation
silly little templating system
- Host: GitHub
- URL: https://github.com/ytti/sapluuna
- Owner: ytti
- Created: 2015-01-27T12:10:45.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2017-01-18T19:21:11.000Z (over 9 years ago)
- Last Synced: 2025-03-25T10:36:40.791Z (about 1 year ago)
- Language: Ruby
- Size: 23.4 KB
- Stars: 4
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Sapluuna
Silly little template based configuration maker
* Anything outside {{{ ... }}} is comment and won't be in generated file
* Inside {{{ }}} you can have <% foo %> which is just ruby
* For method_missing in <% foo %> we try variable[name] hash, given to constructor, i.e. Sapluuna.new variables: {replace_this: 'with_this'} .... <% replace_this %> works
* {{{ can be followed by negative or positive labels, if labels match to those given to constructor {{{ }}} is evaluated, otherwise ignored
* rationale for labels is {{{ PE ..... }}} or {{{ Finland Sweden ..... }}} to conditionally evaluate blocks
* You can query the instance on what variables are needed when labels X are set, use-case is in say in webUI to automatically generate form with all variables template needs