Skip to content

Instantly share code, notes, and snippets.

@jaredcwhite
Last active February 19, 2024 21:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jaredcwhite/7ca06385a5fe4748f9cde7bcbd35f64e to your computer and use it in GitHub Desktop.
Save jaredcwhite/7ca06385a5fe4748f9cde7bcbd35f64e to your computer and use it in GitHub Desktop.
Streamlined example
source "https://rubygems.org"
gem "streamlined"
require "streamlined"
class TestRenderer
include Streamlined::Renderable
def initialize(name:)
@name = name
end
def template
html -> { <<~HTML
<p>#{text -> {@name}}</p>
HTML
}
end
end
TestRenderer.new(name: "Jared White").render_in(self)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment