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