Module: RenderHelper
Instance Method Summary collapse
Instance Method Details
#render(format, template, binding) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/webmock_method/render_helper.rb', line 6 def render format, template, binding body = File.read(template) case format when :json body when :xml ERB.new(body).result binding else throw "Unsupported format: #{format}" end end |