Class: Zanzibar::Actions::Init::TemplateRenderer

Inherits:
OpenStruct
  • Object
show all
Defined in:
lib/zanzibar/actions/init.rb

Overview

Allows us to easily feed our options hash to an ERB

Instance Method Summary collapse

Instance Method Details

#render(template) ⇒ Object

Render an ERB template to a string



39
40
41
# File 'lib/zanzibar/actions/init.rb', line 39

def render(template)
  ERB.new(template).result(binding)
end