Module: Gon::Jbuilder
- Defined in:
- lib/gon/jbuilder.rb,
lib/gon/jbuilder/parser.rb
Defined Under Namespace
Classes: Parser
Class Method Summary collapse
Class Method Details
.handler(args, global = false) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/gon/jbuilder.rb', line 5 def handler(args, global = false) = args , global controller = Gon::EnvFinder.controller_env() controller_name = global ? '' : controller.controller_path parser = Gon::Jbuilder::Parser.new( template_path: Gon::EnvFinder.template_path(, 'jbuilder'), controller: controller, controller_name: controller_name, locals: [:locals] ) data = parser.parse! [data, ] end |