Class: Dolphin::TemplateBuilder
- Inherits:
-
Object
- Object
- Dolphin::TemplateBuilder
- Includes:
- Helpers::Message::ZabbixHelper
- Defined in:
- lib/dolphin/message_builder.rb
Instance Method Summary collapse
Methods included from Helpers::Message::ZabbixHelper
Instance Method Details
#build(template_str, params) ⇒ Object
22 23 24 25 26 27 28 29 30 |
# File 'lib/dolphin/message_builder.rb', line 22 def build(template_str, params) template = Erubis::Eruby.new(template_str) if params.is_a? Hash params.each {|key, val| instance_variable_set("@#{key}", val) } end template.result(binding) end |