Class: Entitlements::ERB

Inherits:
OpenStruct
  • Object
show all
Defined in:
lib/entitlements.rb

Overview

Allows interpretation of ERB for the configuration file to make things less hokey.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.render_from_hash(template, hash) ⇒ Object



73
74
75
# File 'lib/entitlements.rb', line 73

def self.render_from_hash(template, hash)
  new(hash).render(template)
end

Instance Method Details

#render(template) ⇒ Object



77
78
79
# File 'lib/entitlements.rb', line 77

def render(template)
  ::ERB.new(template, trim_mode: "-").result(binding)
end