[UTIL] Fixed whitespace in Ruby template for code generator

This commit is contained in:
Karel Minarik 2013-06-21 16:58:02 +02:00
parent 68d3beb8c3
commit 7bf106ede6
1 changed files with 3 additions and 1 deletions

View File

@ -31,7 +31,9 @@ module Elasticsearch
<%- @spec['url']['parts'].select { |name, info| info['required'] }.each do |name, info| -%>
<%= ' '*(@namespace_depth+1) + "raise ArgumentError, \"Required argument '#{name}' missing\" unless arguments[:#{name}]" + "\n" -%>
<%- end -%>
<%= ' '*(@namespace_depth+1) + "raise ArgumentError, \"Required argument 'body' missing\" unless arguments[:body]" + "\n" if @spec['body'] && @spec['body']['required'] -%>
<%- if @spec['body'] && @spec['body']['required'] -%>
<%= ' '*(@namespace_depth+1) + "raise ArgumentError, \"Required argument 'body' missing\" unless arguments[:body]" + "\n" -%>
<%- end -%>
<%# Method, path, params, body -%>
<%= ' '*@namespace_depth %> method = '<%= @spec['methods'].first %>'
<%- unless @spec['url']['parts'].empty? -%>