Module: Nexmo::OAS::Renderer::Helpers::Render

Defined in:
lib/nexmo/oas/renderer/helpers/render.rb

Instance Method Summary collapse

Instance Method Details

#find_template(views, name, engine, &block) ⇒ Object



8
9
10
11
12
# File 'lib/nexmo/oas/renderer/helpers/render.rb', line 8

def find_template(views, name, engine, &block)
  Array(views).each do |v|
    super(v, name, engine, &block)
  end
end

#render(*args) ⇒ Object



14
15
16
17
18
19
20
# File 'lib/nexmo/oas/renderer/helpers/render.rb', line 14

def render(*args)
  if args.length > 2
    super
  else
    ApplicationController.renderer.new(request.env).render(*args)
  end
end