Class: Entitlements::ERB
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- Entitlements::ERB
- 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
75 76 77 |
# File 'lib/entitlements.rb', line 75 def self.render_from_hash(template, hash) new(hash).render(template) end |
Instance Method Details
#render(template) ⇒ Object
79 80 81 |
# File 'lib/entitlements.rb', line 79 def render(template) ::ERB.new(template, trim_mode: "-").result(binding) end |