Method: Puppet::Application::FaceBase#render
- Defined in:
- lib/puppet/application/face_base.rb
#render(result, args_and_options) ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/puppet/application/face_base.rb', line 38 def render(result, ) hook = action.when_rendering(render_as.name) if hook # when defining when_rendering on your action you can optionally # include arguments and options if hook.arity > 1 result = hook.call(result, *) else result = hook.call(result) end end render_as.render(result) end |