Method: PSRP::MessageEncoder#render
- Defined in:
- lib/wsmv/psrp_message.rb
#render(template, context = nil) ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Renders the specified template with the given context
203 204 205 206 207 208 |
# File 'lib/wsmv/psrp_message.rb', line 203 def render(template, context = nil) template_path = File.( "#{File.dirname(__FILE__)}/templates/#{template}.xml.erb") template = File.read(template_path) Erubis::Eruby.new(template).result(context) end |