lib/jcompiler/provider.rb in jcompiler-0.1.120 vs lib/jcompiler/provider.rb in jcompiler-0.1.121
- old
+ new
@@ -34,15 +34,14 @@
send(key_name, "#{obj_name}.#{key_name}")
end
end
def method_missing(name, *args, &block)
- src = if block
- block.call
- else
- args[0]
- end
- @context << %{"\\"#{name}\\":\#{(#{src}).to_json}"}
+ if block
+ @context << %{"\\"#{name}\\":\#{#{block.call}}"}
+ else
+ @context << %{"\\"#{name}\\":\#{(#{args[0]}).to_json}"}
+ end
end
protected
def value!