dev-resources.site
for different kinds of informations.
Papercraft - Composable Templating for Ruby
Published at
2/8/2022
Categories
ruby
template
html
Author
Sharon Rosner
Papercraft is a new Ruby gem I’ve been working on, that provides a new way to render HTML, XML and JSON using plain Ruby. Here’s what it looks like:
require 'papercraft'
greeter = Papercraft.html { |name| h1 "Hello, #{name}!" }
greeter.render('world') #=> "<h1>Hello, world!</h1>"
Papercraft templates use explicit parameter passing in order to “bind” template variables, and use application and composition to combine templates in a variety of ways.
For more information on Papercraft, head over to the Noteflakes website.
Articles
12 articles in total
Papercraft - Composable Templating for Ruby
currently reading
About that monkey-patching business...
read article
Explaining Ruby Fibers
read article
Embracing Infinite Loops with Ruby and Polyphony
read article
A Compositional Approach to Optimizing the Performance of Ruby Apps
read article
How I Write Code: Pen & Paper
read article
Ever: a callback-less event reactor for Ruby
read article
What's new in Polyphony and Tipi - August 2021 edition
read article
What's new in Polyphony - July 2021 edition
read article
What's new in Polyphony - June 2021 edition
read article
Polyphony has an io_uring backend!
read article
Polyphony - fine-grained concurrency for Ruby
read article
Featured ones: