lib/gon/rabl.rb in gon-2.0.3 vs lib/gon/rabl.rb in gon-2.0.4

- old
+ new

@@ -1,12 +1,14 @@ require 'rabl' -module Gon::Rabl - class << self - def parse_rabl(rabl_path, controller) - source = File.read(rabl_path) - rabl_engine = Rabl::Engine.new(source, :format => 'json') - output = rabl_engine.render(controller, {}) - JSON.parse(output) +module Gon + module Rabl + class << self + def parse_rabl(rabl_path, controller) + source = File.read(rabl_path) + rabl_engine = ::Rabl::Engine.new(source, :format => 'json') + output = rabl_engine.render(controller, {}) + JSON.parse(output) + end end end end