Skip to content

Instantly share code, notes, and snippets.

View gjvis's full-sized avatar

Gareth Visagie gjvis

View GitHub Profile
@gjvis
gjvis / gist:cda554a8a10aaade0022
Created April 1, 2015 17:55
Render an ERB with an instance as the context
require 'erb'
class Context
attr_accessor :foo
attr_accessor :bar
def initialize(foo:, bar:)
self.foo = foo
self.bar = bar
end