Class: Pechkin::Message

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

Overview

Easy way to render erb template

Instance Method Summary collapse

Instance Method Details

#render(template_file) ⇒ Object



4
5
6
# File 'lib/pechkin/message.rb', line 4

def render(template_file)
  ERB.new(IO.read(template_file)).result(binding)
end