lib/RightScaleAPIHelper.rb in RightScaleAPIHelper-0.5.7 vs lib/RightScaleAPIHelper.rb in RightScaleAPIHelper-0.5.8

- old
+ new

@@ -105,18 +105,14 @@ req.set_form_data(values) resp = @conn.request(req) end def api_request(submitted_query) - if is_full_path?(submitted_query) - return submitted_query - else - return "#{@full_api_call}#{submitted_query}" - end + is_full_path?(submitted_query) ? submitted_query : "#{@full_api_call}#{submitted_query}" end # Function just to check if the path that is being passed is a full url or just the extension. def is_full_path?(queryString) - (queryString =~ /^http/i) != nil + !!(queryString =~ /^http/i) end end end