lib/monday/util.rb in monday_ruby-0.6.1 vs lib/monday/util.rb in monday_ruby-0.6.2

- old
+ new

@@ -7,12 +7,16 @@ # Converts the arguments object into a valid string for API. # # input: { key: "multiple word value" } # output: "key: \"multiple word value\"" def format_args(obj) - obj.map do |key, value| + return "" if obj.empty? + + formatted = obj.map do |key, value| "#{key}: #{formatted_args_value(value)}" end.join(", ") + + "(#{formatted})" end # Converts the select values into a valid string for API. # # input: ["id", "name", { "columns": ["id"] }]